Early Christmas Present for Linux Geeks


For those of you who run Linux, I thought I’d post up a backup script I was using (in a modified form) to do completely free backups of my Linux box to Google drive and Usenet Newsgroups. While both of these might sound like horrible ideas, considering that Usenet is public and Google drive is NSA-land, this backup is highly encrypted locally before being sent out. Also, the Usenet backup makes use of PAR2 to provide some resiliency in case of loss of up to 10% of the posts. All-in-all, I was pretty happy with the solution, but I only use it these days for Linux servers. I’ve since switched to Crashplan for my Linux desktops, simply due to ease of use.

As for the specifics of what it’s designed to do, basically, the goal was to backup all necessary information to restore documents, settings, and reinstall apps in as small of a footprint as possible. The script has these features:

  • Saves all installed packages to a file (Package.list) so you can restore all of them with a single command.
  • Saves all installed sources to a file (sources.list).
  • Saves all installed repository keys to a file (Repo.keys)
  • Saves the script itself, along with an optional restore script.
  • Puts all of the above info into a ‘kernel’ backup, which is the bootstrap that you need to restore the full backup. Basically, by restoring the kernel backup, you install all of the necessary software and scripts that allow you to then restore all of your personal data and settings from the main backup.
  •  Backs up your home folder, using an exclusion list to exclude files, wildcards, and directories that are superfluous (trash, temp folders, etc.) as well as ISO files. 
  • Stores the home folder backup in a different file which is encrypted separately and (optionally) split (rar), PARed, and double encrypted (RAR and GPG).
  • Is intelligent enough to pickup where it left off if interrupted (within reason) or only do the minimum amount of work. For example, if you already performed a Google backup but now want to do a Usenet backup, it won’t repeat all of the steps that are the same between the two. 
  • Does all of the previous while cleaning up any cruft or leftovers from old backups. 
  • Is fully configurable.
  • Will use with newsmangler or newspost for Usenet posting.

Anyhow,  the bash script is available here:
https://github.com/networkingguru/backup_script

Requirements and Usage are in the Readme as well as in the head of the script itself.

,

  1. No comments yet.
(will not be published)