Skip to content

Commit

Permalink
Stops unmounting source partition on restore
Browse files Browse the repository at this point in the history
Ensures the source partition (eg, /dev/sdb1) is NOT unmounted during a restore
operation. Unmounting this was mistakenly added in a recent commit. [1]

Given the source partition is read from a file not a block device, the source
partition variable ($part) only indicates what the original source partition
device node was, so is mostly not relevant during the restore process. In fact,
if the sdb1 partition happens to be the source drive where the backups are
stored, this breaks the restore operation. This breakage was not caught during
testing of the prior commit as backup drive and the original partition being
restored happened to not have the same device node string.

[1] 8f4f0db
  • Loading branch information
shasheene committed Feb 14, 2020
1 parent b47cbee commit 91faaec
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/livecd/chroot/usr/local/sbin/rescuezilla
Expand Up @@ -904,7 +904,6 @@ sub update_restore_progress {
# See if the filehandle is open
if (!defined($PROGRESS)) {
umount_warn_on_busy("/dev/$dest_drive$pn");
umount_warn_on_busy("/dev/$part");
system("dd if=/dev/zero of=/dev/$dest_drive$pn bs=1K count=1000; sync");
set_status(loc("Preparing to restore backup for Drive [_1], Part [_2]...",$dn,$pn));
my $backup_version = `cat /$src.rescuezilla.backup_version`;
Expand Down

0 comments on commit 91faaec

Please sign in to comment.