borg icon indicating copy to clipboard operation
borg copied to clipboard

Retry option for remote repositories

Open DataBeaver opened this issue 8 years ago • 3 comments

I got cloud storage for offsite backups and while doing the initial upload (which takes days) the provided experienced some network problems. I restarted the backup run about ten times. Would it be possible for borg to retry automatically if it sees that the ssh connection goes down?

Somewhat related to #1424 in that both require distinguishing between connection errors and other problems.

DataBeaver avatar Dec 13 '17 07:12 DataBeaver

That would be great, I often experience transient ssh connection breaks due to unstable uplinks and need to manually restart multiple times as well.

varac avatar Aug 26 '18 19:08 varac

This would be soooo useful for residential internet connections with daily force reconnects. I've seen no (literally not a single) backup solution that implements SFTP/SSH retries. The internet is such a volatile thing, I think this should be possible for such long running tasks as backups.

I'm willing to help with this.

MexHigh avatar Jun 24 '24 07:06 MexHigh

borg 1.4 will have more detailed exit codes, so guess it might be possible to solve that already on the script level - see the latest beta/rc if you want to test that.

if the connection breaks down, this is not just some "retry": the ssh client / server process pair is gone, the remote IP might have changed.

so, just starting the same borg command again in the script if it detects a connection loss might be the easiest solution.

ThomasWaldmann avatar Jun 24 '24 07:06 ThomasWaldmann