Simple rsync based backup script

This simple bash script is able to backup all given files and folders to a backup destination. I use it to backup all my Raspberry Pis, Banana Pis and also my notebook to my Synology NAS. #!/bin/bash # Lockfilecheck for race condition protection exec 9>.backupLockFile if ! flock -n 9 ; then echo “Another instance is […]

Sync files with rsync

To sync filesystems over ssh (with port): $> rsync -azvu –exclude-from=’./exclude.txt’ -e ‘ssh -p 26 -o StrictHostKeyChecking=no’ user@host:/PATH/TOREMOTE/FILE/ORFOLDER/ /PATH/TO/LOKAL/FILEORFOLDER; Useful parameters -o StrictHostKeyChecking=no –  tells the the source host to accept the ssh-key from the destination host –exclude-from=’./exclude.txt’ – in exclude.txt each line specifies a path to ignore through synchronization –dry-run – only simulate what would have been […]