fix
This commit is contained in:
parent
90a40b2f2f
commit
6b53bac1d4
12
debian.sh
12
debian.sh
@ -140,11 +140,15 @@ os-restore() {
|
|||||||
BACKUP_DISK_IMAGES="/var/backups"
|
BACKUP_DISK_IMAGES="/var/backups"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${3}" ]; then
|
||||||
|
BACKUP_DISK_IMAGES="${3}"
|
||||||
|
fi
|
||||||
|
|
||||||
partitions
|
partitions
|
||||||
rm -rf $TARGET/usr $TARGET/sbin $TARGET/lib32 $TARGET/libx32 $TARGET/lib $TARGET/vmlinuz* $TARGET/initrd* $TARGET/bin $TARGET/var $TARGET/root $TARGET/opt $TARGET/etc $TARGET/run
|
rm -rf $TARGET/usr $TARGET/sbin $TARGET/lib32 $TARGET/libx32 $TARGET/lib $TARGET/vmlinuz* $TARGET/initrd* $TARGET/bin $TARGET/var $TARGET/root $TARGET/opt $TARGET/etc $TARGET/run
|
||||||
echo "[Restirubg OS tarfile from $BACKUP_DISK_IMAGES/$1.tgz]"
|
echo "[Restoring OS tarfile from $BACKUP_DISK_IMAGES/$1.tgz]"
|
||||||
echo
|
echo
|
||||||
tar xfpv $BACKUP_DISK_IMAGES/$2.tgz -C $TARGET/
|
tar xfp $BACKUP_DISK_IMAGES/$2.tgz -C $TARGET/
|
||||||
|
|
||||||
if [ "$3" = "home" ]; then
|
if [ "$3" = "home" ]; then
|
||||||
rsync -a --delete /home/ $TARGET/home/
|
rsync -a --delete /home/ $TARGET/home/
|
||||||
@ -519,7 +523,7 @@ show-help() {
|
|||||||
echo
|
echo
|
||||||
echo "./debian.sh install [disk]"
|
echo "./debian.sh install [disk]"
|
||||||
echo "./debian.sh backup [device name] [home]"
|
echo "./debian.sh backup [device name] [home]"
|
||||||
echo "./debian.sh restore [disk] [backup name] [home]"
|
echo "./debian.sh restore [disk] [backup name] [home] [tar dir]"
|
||||||
echo "./debian.sh chroot [disk]"
|
echo "./debian.sh chroot [disk]"
|
||||||
echo "./debian.sh wifi"
|
echo "./debian.sh wifi"
|
||||||
echo "./debian.sh bootloader [disk]"
|
echo "./debian.sh bootloader [disk]"
|
||||||
@ -564,7 +568,7 @@ elif [ "$1" = "grub-snapshots" ]; then
|
|||||||
elif [ "$1" = "btrfs-tweaks" ]; then
|
elif [ "$1" = "btrfs-tweaks" ]; then
|
||||||
btrfs-tweaks
|
btrfs-tweaks
|
||||||
elif [ "$1" = "restore" ]; then
|
elif [ "$1" = "restore" ]; then
|
||||||
os-restore "$2" "$3" "$4"
|
os-restore "$2" "$3" "$4" "$5"
|
||||||
elif [ "$1" = "remove-snapshot" ]; then
|
elif [ "$1" = "remove-snapshot" ]; then
|
||||||
remove-snapshots
|
remove-snapshots
|
||||||
elif [ "$1" = "help" ]; then
|
elif [ "$1" = "help" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user