rsync to backup system

Refer here

Backup our sytem

sudo rsync -aAXv --delete --dry-run --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/* --exclude=/media/* --exclude="swapfile" --exclude="lost+found" --exclude=".cache" --exclude="Downloads" --exclude=".ecryptfs" /source /destination

Change the partition format if needed

df -T /run/media/alu/alu

sudo unmount /dev/sdv1
sudo mkfs.ext4 /dev/sdb1 -L 'ALU'

lsblk

Restore the system

mkdir -p /mnt/usb/
mount /dev/sda1 /mnt/usb
rsync -aAXv --delete --exclude="lost+found" /mnt/usb/ /mnt/system

Leave a Reply

Your email address will not be published. Required fields are marked *