Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Question says it all:

What happens if rsnapshot or rdiff-backup gets interrupted in the middle of a transfer?

I know that rsnapshot tries to make a complete snapshot of your system in rotating fashion, and rdiff-backup makes a differential backup, which is going to be based on the files previously saved behind it.

So: What happens if it gets interrupted in the middle?

Does this result in an "incomplete snapshot"?

Will other snapshots which are dependent on this one be corrupted? (Surely not, but... ?)

share|improve this question
Wouldn't it have been much clearer if you had separated this question in to two separate questions? –  andol Oct 15 '10 at 5:46
@andol If he was looking for information on how to recover from an interrupted transfer, I think it would be better as two questions. I interpreted this is more of a request for a comparison of how much trouble you'd be in if you used each utility, though, like it's a variant of "help me decide which to use." –  ændrük Oct 15 '10 at 12:17
Thanks Andol; but no, I think this stands as one question. Basically, "what happens if rsnapshot/rsync gets interrupted in middle of transfer?", and I think the tools span one specific niche, so this does not IMO warrant two separate questions. I posed the question of 'incomplete snapshot' as one potential result for clarification purposes. –  e.m.fields Oct 15 '10 at 15:44

2 Answers 2

up vote 15 down vote accepted

My understanding is that...

rdiff-backup will detect the incomplete increment the next time it runs. It will delete the incomplete increment so that the backup location is the same as if the interrupted backup attempt had never been started.

rsnapshot is a little more complicated because its routine is more stepwise and varies depending on the use of the sync_first and use_lazy_deletes options.

  • If you use sync_first and rsnapshot sync gets interrupted, you can simply run rsnapshot sync again to straighten things out. If you accidentally run rsnapshot <backup level> at this point instead, the latest backup point will remain incomplete and will be carried through rotations.
  • If you don't use sync_first, you're just stuck with an incomplete backup point that is a hybrid of old and new version of files. Unless you manually reverse-rotate each backup point, the incomplete backup point will be carried through rotations.
  • In both cases, running rsnapshot <backup level> will cause the oldest backup point to be lost unless use_lazy_deletes is enabled.

Note that sync_first and use_lazy_deletes come at the cost of using more disk space.

A reminder/disclaimer: This should go without saying, but never just blindly trust others' advice on the internet. If you plan to use rdiff-backup or rsnapshot for something mission-critical, read every word of the manual and test, test, test everything yourself!

share|improve this answer
An appreciable reminder, and good practice to keep up with this kind of "proper methods" culture, we don't want linux to turn into dumb-consumer-land. Thanks for the note. –  e.m.fields Oct 15 '10 at 15:40
So, understanding correctly: having an incomplete backup "carried through the rotations" for rsnapshot will amount to two things: 1. That snapshot will be incomplete if referred back to at a later point 2. Any higher-level snapshots will still be complete, but will not properly refer back to previous hard-linkable files which were missed in the incomplete snapshot. Is this correct? –  e.m.fields Oct 15 '10 at 15:53

That just happened to me. my external drive became full half-way through rsnapshot's incremental backup:

rsync: write failed on "<path>": No space left on device (28) 

Now I'd like to share a couple of things I learnt from this. ie to repair and limit considerabily chances for such a case to bite me back ;)

Resume a Rsnapshot's interrupted backup

  1. Delete the last directory (e.g. daily.0)
  2. Rename consecutive directories (daily.1 -> daily.0, ...); possible script1
  3. Run the backup as usual (again).

Make sure rsnapshot backups are (well) done

rsnapshot has no pause/stop and resume capabilities (except for limited undocumented "skipped due to rollback plan" 2). Now we can wrap it with a tool that just add these features to rsnapshot.

I've found and began to test rsnapshot-once3 by Philipp C. Heckel: it's a wrapper for rsnapshot in PHP that:

  • works without modifying your rsnapshot's conf
  • ensure that daily, weekly and monthly tasks are run only once in the respective time period, via cron
  • rollback of failed backup (checks if the last backup was complete; if not the last directory is deleted and consecutive directories are renamed eg daily1. -> daily.0, ...)

Works fine for me: I edited php.ini's openbase_dir for my backup need and voila, lucky day ^_^ Smoother and more powerful than my previous (cron-based: Anacron or cronwhip) based solution.

Note: slm linked me here from duplicate question: Rsnapshot destination full - how to safely rerun?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.