update: safety first!

when it comes to important files: safety comes first

thus recommend to the user that wants to go pro the following backup system:

  • have two complete backups at two different places:
    • backupA: at the company, USB 3.0 (! THE MORE DATA IS BACKED UP THE MORE SPEED IS NEEDED (or restore might take DAYS!)) connected to the server, doing daily incremental backups
    • backupB: being a fire-proof double-metal casing (EMP proof) vault at a different place (home?)
  • change those backups every day if possible otherwise every week
    • if ransomeware destroys backupA then in the worst case scenario, one day or one week of work is gone
    • remember: whatever is physically connected to the server, can be encrypted by ransomeware
  • have the backup strategy tested once a year
    • where the backup is restored completely on a backup-server, to test if all data is there and how long the process takes (USB 2.0 is definitely a massive bottleneck)

rsync is a cool beast with a billion options it allows you to ssh-secured transfer your backups to remote locations…

pros:

  • does chunk-wise md5 integrity check on files if files differ only slightly it will “delta-transfer” only the diff not retransfer the whole file…

cons:

  • complicated: the amount of options and combinations of options can be overwhelming.

you can even specify the bandwidth to be used:

# over INTERNET
rsync -vv --bwlimit=65 -r --archive --partial --append-verify --inplace --progress --compress -e 'ssh -p22' /BACKUP/DAILY/ USER@SERVER:/BACKUP/DAILY/

src: https://unix.stackexchange.com/questions/48298/can-rsync-resume-after-being-interrupted

--compress

option because it’s CPU intense

while

--bwlimit=65

limits the amount of upload-bandwidth used (just in case you need internet at the same time)

example script called: onlineBackup.sh

that could be called by cron every hour:

#!/bin/bash
ps cax | grep -v rsyncd | grep -v grep | grep rsync > /dev/null
if [ $? -eq 0 ]; then
  echo "Process is running."
else
  echo "Process is not running."
  # backup more important first
  rsync -vv --bwlimit=65 -r --archive --partial --append-verify --inplace --progress --compress -e 'ssh -p22' /BACKUP/DAILY/ USER@SERVER:/BACKUP/DAILY/
fi


liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin