Backup Your Linux Machine

I was up to maintenance of my Debian box, and I came in need of creating and maintaining multiple, date-based backups of the machine.

Here is the bash script I wrote to accomplish this.

Once executed, this script will backup the target specified by “$target” (the whole filesystem in this case) and create a tar.gz file under “/backups/month/date.tar.gz”. You have to specify an “admin” email account to which notifications will be sent.

Leave a Reply

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