Ralph Weaver wrote at about 17:31:19 -0500 on Wednesday, January 4, 2012: > We ran into an issue with a backuppc restore where we had unknown files > causing issues due to existance. We tried to restore thinking it would > remove the extraneous files as a normal rsync with the --delete option > does, but it didn't do this (and the files are mixed in with files > essential for running the system.) It left the extra files and replaced > the other files with the correct version that was backed up. We tried > to add --delete to the restore args but of course since File::RsyncP > doesn't support that it didn't work.
The behavior of backuppc is the normal and correct behavior of standard backup programs. It would be quite dangerous for a backup restore program to delete files since typically that would cause all files since the last backup to be deleted which is not usually the desired result. > Is there any way around this issue aside from restoring directly to a > different directory and then rsyncing those files over with a --delete > to the main system? > If you want to delete all files other than those on the backup that you are restoring, then the solution is trivial. Just delete the entire directory tree before restoring so that you are restoring into an empty directory. If the issue is that you are restoring system files on a running system, well although that often works, it is not recommended since bad things can happen. In that case, it would be better to mount the system root on another live system, delete the system root and restore there. If you really need to restore a system directory, then you can do as you are doing now and then use 'find' after the restore to find and delete any files created between the time of the backup and the time of the restore. Of course, there still could be 'race' condition types of edge cases but this would happen when using rsync --delete on a system tree too. ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/