fix
This commit is contained in:
parent
915ee0b5b4
commit
8aae450fae
@ -71,8 +71,8 @@ create-os-snapshots() {
|
|||||||
echo
|
echo
|
||||||
echo "[Creating new snapshots.....]"
|
echo "[Creating new snapshots.....]"
|
||||||
echo
|
echo
|
||||||
mkdir -p $TARGET/\@$BACKUP_DISK_MAPPER/var/lib/backup
|
mkdir -p $TARGET/\@$BACKUP_DISK_MAPPER/var/backups
|
||||||
time tar cvpzf $TARGET/\@$BACKUP_DISK_ROOT_NAME/var/lib/backup/$1.tgz --exclude=/volumes/* --exclude=/mnt/* --exclude=/var/tmp/* --exclude=/tmp/* --exclude=/raid/* --exclude=/root/* --exclude=/var/cache/apt/archives/* --exclude=/proc/* --exclude=/.snapshots/* --exclude=$TARGET/* --exclude=/var/lib/libvirt/* --exclude=/dev/* --exclude=/sys/* --exclude=/home/* --exclude=/var/lib/postgresql --exclude=/var/lib/containers /
|
time tar cvpzf $TARGET/\@$BACKUP_DISK_ROOT_NAME/var/backups/$1.tgz --exclude=/volumes/* --exclude=/mnt/* --exclude=/var/tmp/* --exclude=/tmp/* --exclude=/raid/* --exclude=/root/* --exclude=/var/cache/apt/archives/* --exclude=/proc/* --exclude=/.snapshots/* --exclude=$TARGET/* --exclude=/var/lib/libvirt/* --exclude=/dev/* --exclude=/sys/* --exclude=/home/* --exclude=/var/lib/postgresql --exclude=/var/lib/containers /
|
||||||
}
|
}
|
||||||
|
|
||||||
homeBackup() {
|
homeBackup() {
|
||||||
@ -121,7 +121,7 @@ os-backup() {
|
|||||||
os-restore() {
|
os-restore() {
|
||||||
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
|
||||||
tar xfpv /var/lib/backup/$2.tgz -C $TARGET/
|
tar xfpv /var/backups/$2.tgz -C $TARGET/
|
||||||
|
|
||||||
if [ "$3" = "home" ]; then
|
if [ "$3" = "home" ]; then
|
||||||
rsync -av --progress --delete /home/ $TARGET/home/
|
rsync -av --progress --delete /home/ $TARGET/home/
|
||||||
|
Loading…
Reference in New Issue
Block a user