$ tar -xzf yakup-1.0.4.tar.gz $ cd yakup-1.0.4
Yakup is a tool for managing multi-level backups to fixed disk and removable CD/DVD media. Yakup can also be used for ad-hoc archiving.
Full and multi-level differential backups.
Backup up and restore from fixed disk or removable CD/DVD media.
Media spanning.
tar(1) formatted archives.
Optional gzip or bzip2 compression.
Single bash(1) shell script — trivial installation, runs on any Linux system.
Flexible customizable configuration options.
Yakup README file.
Yakup CHANGELOG file.
yakup(1) man page.
yakup.conf(5) man page.
Documentation is shipped in the yakup distribution ./doc/ directory.
HTML and man page documents generated by AsciiDoc.
yakup-1.0.4.tar.gz — a tarball distribution of the latest version of Yakup.
Yakup can also be downloaded from the SourceForge http://sourceforge.net/projects/yakup/.
Unpack the downloaded distribution tarball:
$ tar -xzf yakup-1.0.4.tar.gz $ cd yakup-1.0.4
Copy yakup to a location in your $PATH. For example:
# cp yakup /usr/local/bin/
Copy the yakup man pages to your you system's man page directories (this step is optional). For example:
# cp doc/yakup.1.gz /usr/share/man/man1/ # cp doc/yakup.conf.5.gz /usr/share/man/man5/
Check the default yakup configuration suits your system:
$ yakup --dump-conf
Optionally customize default behaviour by installing a global /etc/yakup/yakup.conf or user $HOME/.yakup/yakup.conf configuration file (see yakup.conf(5) man page and distributed examples in ./examples/). Alternatively you can use the corresponding command-line options.
Before using yakup(1) to burn CD's or DVD's test the cdrecord(1) and growisofs(1) from the command-line to ensure they are correctly configured. You should also check you can mount and unmount removable media using the mount point specified in the fstab(5).
Don't forget to exclude the archive directory (see yakup(1) —archive-dir option) from your backups — you'll get unexpectedly large archives if you don't.
By default yakup executes silently — use the —verbose option to see what's going on (a second —verbose option displays even more information).
Use the —dump-conf option to check the program option and configuration file settings.
Use the —dry-run option to check out command execution without actually doing anything. Bear in mind that because commands are not actually executed subsequent dependent commands won't always generate the expected output.
When yakup(1) shells other programs it encloses arguments in single quote characters, if any of these downstream arguments contain single quotes an error will occur (this is because you cannot include single quote characters inside a single quoted string, nor can they be escaped). This is a problem when you enter file names containing single quotes, for example restoring a single file:
$ yakup -r -R /tmp -i "Stuart's Yakup Notes.txt"
The workaround is to use the ? wildcard character instead:
$ yakup -r -i "Stuart?s Yakup Notes.txt"
# yakup.conf: yakup configuration file. # # This file is sourced by yakup before processing command-line options. # ARCHIVE_DIR=/var/local/yakup/archives CDR_DIR=/media/cdrom CDR_SIZE=700M CDRW_DIR=/media/cdrom CDRW_SIZE=650M CDRECORD_OPTS=driveropts=burnfree COMPRESSION=gzip DEV=/dev/hdc DVD_DIR=/media/cdrom DVD_SIZE=4.2G EXCLUDE_FILE=/var/local/yakup/excluded INCLUDE_FILE=/var/local/yakup/included LOG_FILE=/var/log/yakup.log MEDIA=dvd MKISOFS_OPTS="-r -J" PREFIX=yakup%l.$(date +%Y%m%d) RESTORE_DIR=/var/local/yakup/restore VOLUME_ID="yakup%l $(date +%F) (%n of %N)"
/proc /mnt /dev /.dev /cdrom /media /tmp /sys /var/local/yakup/archives /var/local/yakup/restore lost+found *.iso
/
There are many ways of organizing your backup regime, this is just how I use yakup to manage my server backups (about 20GB). Every month I do a full (level 0) backup to DVD-R's. Between full backups I do daily differential (level 1) backups, recycling two DVD+RW's (on-site and off-site).
Monthly full backup command:
# yakup -abtl 0
Daily differential backup command:
# yakup -abtul 1
The toc command is a handy way of verifying the recorded media.
The —unattended option is used for the daily backup because I want to know beforehand if more than one backup disk is required.
Although I only rotate two daily backup I keep that last couple of weeks of daily archives on hard disk.
|
Important
|
My backup regime is fairly informal — a more rigorous solution would be a full backup every month (to write-once media), 5 cycled weekly level 1 backups (to rewritable media) and 7 cycled daily level 2 backups (to rewritable media). |
A single-chunk yakup archive is a stand-alone GNU tar file so it's easy to create a tar archive and burn it to a CDROM or DVD. The following example creates an archive on the projects directory and writes it to CDRW:
$ yakup -abm cdrw ~/projects
I couldn't find a script that satisfied my wish list:
Multi-level backups.
Transparent media spanning and burning.
Tar format archives.
CDROM and DVD media support.
Stand-alone script with minimal system dependencies.
Writing Yakup using Ruby would have been more pleasurable but I didn't want to have to worry about finding and installing the correct version of a language interpreter and it's associated libraries when trying to perform an emergency rebuild (that really is the last thing you need).
I choose bash(1) because it's installed by default on virtually all Linux (and most modern UNIX based) systems. Sure, the Bourne shell is even more ubiquitous but bash's extensions make coding bearable.
Support for more removable media types e.g. floppy and Zip drives.
cpio(1) based backup — yakup borrowed backup's last file detection and FIFO
piping techniques.
http://www.bluehaze.com.au/unix/cdbkup
Disk archiver. http://dar.linux.free.fr/ http://gradha.sdf-eu.org/textos/dar-differential-backup-mini-howto.en.html
Backup and recovery system.
http://www.mondorescue.org/
Free use of this software is granted under the terms of the GNU General Public License (GPL).