Admin Books

DOWNLOAD Free e-Books for Linux Admin Servers :

RDIFF-BACKUP with --force


"Programming is like sex. One mistake and you have to support 
   it for the rest of your life". (Michael Sinz)


Fatal Error: Destination directory


/Volumes/Backup320


exists, but does not look like a rdiff-backup directory.  Running
rdiff-backup like this could mess up what is currently in it.  If you
want to update or overwrite it, run rdiff-backup with the --force
option.


Creating backups is good, but they are of little use if you can't restore files from them. A restore, at its simplest, is just a backup reversed. In other words, the order of directories on the command line is reversed—the mirror first, the directory to restore to second. There is one important caveat: rdiff-backup, by default, will not restore over an existing file/path. Think of it as sort of a foot/gun safety. You have two options, restore to another path or use the --force switch to override the default behavior.

rdiff-backup gives you two basic methods for restoring a specific version of a file: time-based and number-based.


My reading is that using --force on a restore will overwrite existing 
files with the same name - so you may lose previous data at the restore
destination. In general if you are restoring a directory (or a complete
repository) it is logical to use a clean destination, in which case it
shouldn't be a problem.



When you are restoring a directory, "--force" will not only overwrite
existing files (which is probably what you intended, anyway), but it
will also _delete_ any files or even entire subdirectories that were
not present in the backup.  It will restore your directory to exactly
the state it was on the backup, nothing more, nothing less.  That
might be a nasty surprise.


--force
              Authorize  a more drastic modification of a directory than usual
              (for instance, when overwriting of a destination path,  or  when
              removing  multiple  sessions  with --remove-older-than).  rdiff-
              backup will generally tell you if it needs this.   WARNING:  You
              can cause data loss if you mis-use this option.  Furthermore, do
              NOT use this option when doing a  restore,  as  it  will  DELETE
              FILES, unless you absolutely know what you are doing.