Recover file backup operations after network disconnection
Q I use IBackup, because I can have backups from my own PC (Ubuntu) and from my wife's Windows PC. She can manage her backups without any intervention from me. The problem is, that often during the backup on my PC, which is performed by cron, the connection drops. When that happens the stunnel I created collapses, which is devastating for the backup, and I end up with a backup that was partially copied to the IBackup server. Is a way to recover from such a disconnect, or even to actively reconnect, without losing what you are doing?
The IBackup server does not allow setting the time and datestamps of the copied files, causing the files all to have the time and date of copying. For that reason I copy tarred files and lose the rsync ability. This might be incentive enough to switch to Rsync.net, however I will have to copy the files from my wife's PC too. With IBackup she has her own connection and URL.
A If you are using rsync, restarting the backup should be no trouble, because rsync will simply pick up where it left off. The server may be using the time of copying as the timestamp because of your rsync options. You need to call rsync with the --times option to preserve timestamps. The --archive option combines several options useful for backups, including --times. This should remove the need to copy tar archives to the server, and therefore mean that you are copying individual files in the same form that they exist on your original machine, which makes restarting a backup easier.
I tried Rsync.net after reading the article (I used Strongspace at the time) and switched to them completely. Backing up multiple machines is easy as you can do more or less what you want with the available space, so you can create a directory for each machine's backup. Rsync.net uses SSH for rsync transfers, so there's no need for stunnel, and you can use Duplicity to encrypt the data for storage. An alternative approach is to backup everything to a local disk then sync that to the remote server. This has the advantage that your first line of backups is local - making restoration faster - but it does mean that the backup computer has to be switched on whenever any computer needs to make a backup.
- Write backup script that only selects one file
- Backup script not working in cron
- Looking for a remote backup server
- Advanced file permissions
- Choosing backup software