#!/bin/bash # test first with: --dry-run src=/ #target=/mnt/data/backup-$(date --iso-8601) target=user@192.168.2.19:/media/data/backup-$(date --iso-8601) opts="-rltDvuh --modify-window=1 --progress --delete --exclude-from=exclude.txt" sudo rsync --dry-run $opts $src $target #sudo rsync $opts $src $target
# exclude.txt node_modules bower_components cache .cache .npm lost+found backup_files /lost+found /media /dev /mnt /proc /sys /tmp /var/tmp /var/spool /var/log /var/snap /home/noded/mstream/music/
#!/bin/bash rsync -a --delete --quiet -e ssh /folder/to/backup remoteuser@remotehost:/location/of/backup # full system backup rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} -e ssh / remoteuser@remotehost:/location/of/backup
# Full partiton backup (dd): dd if=/dev/sda1 of=./backup.img bs=1M
95500cookie-checkLinux Rsync backup