Samuel VERMEULEN 12 months ago
parent
commit
2f30c23f92
  1. 17
      synchro-disk.sh

17
synchro-disk.sh

@ -0,0 +1,17 @@
#!/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
Loading…
Cancel
Save