You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
289 B

#!/bin/bash
set -e
p=$1
mount ${p}1 /mnt
rsync -av --delete-after /boot/ /mnt/
umount /mnt
sleep 10
mount ${p}2 /mnt
rsync -av --delete-after --exclude={"/boot/*","/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/swapfile"} / /mnt/
umount /mnt
exit 0