BACKUP LINUX SYSTEM TO AN EXTERNAL DRIVE/NAS

This is a script to backup your root drive to a destination disk. You will need rsync to use this script. #!/bin/bash DIRECTORYNAME=fullsystembackup-“$(/bin/date +\%y-\%m-\%d)” #Start backup sudo rsync -aAXvP –exclude={“/dev/*”,”/proc/*”,”/sys/*”,”/tmp/*”,”/run/*”,”/mnt/*”,”/media/*”,”/home/*/media*”,”/home/*/Dropbox*”,”/home/*/.local/share/Trash/*”,”/home/*/.thumbnails/*”,”/home/*/.cache/mozilla/*”,”/home/*/.cache/chromium/*”,”/home/*/.gvfs”,”/lost+found”} / /mnt/backup-location/backup/linux/$DIRECTORYNAME