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.

Features

Documentation

Download

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/.

Installation

Tips

Example Configuration Files

Example: yakup.conf
# 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)"
Example: excluded (sourced by —exclude-file option)
/proc
/mnt
/dev
/.dev
/cdrom
/media
/tmp
/sys
/var/local/yakup/archives
/var/local/yakup/restore
lost+found
*.iso
Example: included (sourced by —include-file option)
/

Usage Scenarios

Two level single machine backups

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
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).

Ad-hoc archives

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

Design Rationale

Why another backup script?

I couldn't find a script that satisfied my wish list:

Why didn't you use Ruby/Python/Perl?

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.

Possible Improvements

Other Backup Programs

Bluehaze Backup

cpio(1) based backup — yakup borrowed backup's last file detection and FIFO piping techniques.
http://www.bluehaze.com.au/unix/cdbkup

DAR

Disk archiver. http://dar.linux.free.fr/ http://gradha.sdf-eu.org/textos/dar-differential-backup-mini-howto.en.html

Mondo Rescue

Backup and recovery system.
http://www.mondorescue.org/

License

Free use of this software is granted under the terms of the GNU General Public License (GPL).