diff -Nur -x '*.orig' -x '*.rej' e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk --- e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk 2006-03-14 10:08:45.000000000 -0700 +++ mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk 2007-01-18 08:56:02.000000000 -0700 @@ -35,7 +35,7 @@ exit 0 unless $program eq 'CopyFromDisk'; -die("Root path to restore from must be provided\n") unless defined $path; +die("Root path to restore from must be provided\n") unless defined $path && -d $path; chdir $path or die "Could not chdir to $path: $!"; my $backup_db = new esmith::Backup or die "Couldn't create Backup object\n"; @@ -45,12 +45,14 @@ die "Can't fork: $!" unless defined(my $pid = open(STDIN, "-|")); if ($pid) { - # parent - copy files from $path to / - exec("cpio", "-dump", "/"); + # parent - extract files to / + exec(qw(tar -C / -xf -)); } else { - # generate a set of pathnames under $path which are to be restored - exec("find", @restore); + # create archive from $path which are to be restored + chroot($path) || die "Can't chroot to $path"; + open(STDERR, ">/dev/null"); + exec(qw(tar -C / -cf -), @restore); }