BackItUp

1. Authors

  • Hans Bulfone hans@nil.at

2. Short Description

A simple backup system implemented in Scheme

3. Download

4. Installation

BackItUp compilation requires the CHICKEN Scheme compiler. The installation is simple:

BackItUp Installation
$ tar -xzf backitup-1.0.tar.gz
$ cd backitup-1.0
$ gmake
# gmake install

This installs BackItUp in /usr/local/bin.

5. Usage

BackItUp Invokation
$ backitup driver-file

The driver file is Scheme code defining the backup job. A very simple driver file could look like this:

A simple driver file
;; A simple driver file for BackItUp

(backup:job-name "a simple backup job")
(backup:output-file (string-append "/backups/backup-"
                                   (timestamp)
                                   ".tar.gz"))
(backup:add-paths
 "/etc"
 "/usr/home"
 (with-parent-dir "/usr/local"
   "etc"
   "cvsroot")
 "/root")

5.1. Encryption

BackItUp supports encryption with GnuPG using a symmetric cipher:

Encrypting the backup
(backup:encrypt? #t)
(backup:gpg-passphrase "my-passphrase")

If (backup:gpg-passphrase) is not set BackItUp prompts for a passphrase.

5.2. Sending Mail

BackItUp can notify you via e-mail when the backup job is done:

Sending e-mail
(backup:add-job #f (lambda ()
                     (send-mail "your backup job has finished"
                                '("you@domain.com")
                                backup-finished-mail)))

backup-finished-mail is a predefined procedure for generating the body of the e-mail. If you want, you can also use your own procedure. It should take no arguments and simply write the desired body to (current-output-port).

The body generated by backup-finished-mail looks like this:

e-mail generated by backup-finished-mail
Hi,

The backup job 'a simple backup job' has finished successfully.
tar finished successfully.
tar stderr output:
----------------------------------------------------------------------
tar: Removing leading '/' from member names
----------------------------------------------------------------------

gpg finished successfully.
The data has been written to /backups/backup-2005-12-18-05-04-36.tar.gz.gpg.

Regards, BackItUp.

6. License

Copyright (c) 2005, 2006  Hans Bulfone
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the author nor the names of his contributors may
      be used to endorse or promote products derived from this software
      without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Send comments, suggestions, etc. to me.