June 2005 Archives
So, due to my inability to prefix a command with a "/", I recently lost most of my home directory. So, I was prompted to write a backup management script. My only problem was I wanted the ability to NOT backup certain directores (I really don't need to backup the kernel source four times), and I wanted the final result gpg encrypted. So, I present you with backup.sh. When called, it scans $HOME for .nobackup files, and adds the directory to the exclude list for the backup. It then creates, if it doesn't exist already, $HOME/.backups, and $HOME/.backups/.nobackup (there's no point in backing up backups, over and over). The backup is in a timestamped .tar.gz, and if $HOME/.backups/gpgkey exists (and contains something like, "0x057F140A", no trailing newline, less quotes), it will then encrypt the backup and rm the .tar.gz (no longer needed).
