Home > ohsnap

ohsnap

Ohsnap is a project mainly written in Shell, based on the View license.

Simple backup program for GNU/Linux systems that creates backups from filesystem snapshots.

DESCRIPTION

 ohsnap is a program which makes backups of entire filesystems. If the
 filesystem is on a LVM2 logical volume or is btrfs, a snapshot will be
 taken and the backup taken from that. This is ideal for a busy system.

 ohsnap assumes you want a full backup on Sunday and incremental
 backups the following days. It can also retain a configurable number
 of previous cycles.

 If the filesystem type is XFS, xfsdump(8) will be used to conduct the
 backup, otherwise GNU tar(1) is used.

USAGE

 - Edit /usr/local/etc/ohsnap.conf and describe your filesystems.

 - sudo ohsnap
   or
   sudo ohsnap -v

   The latter will log to the terminal in addition to the log file.

 - Watch the fun in /var/log/ohsnap.log.

 - Good? Create a cron job for it.

REQUIREMENTS

 - A mostly POSIX-compliant Bourne shell. Tested using dash.

 - Debian or a derivative (such as Ubuntu). Other GNU/Linux-based
   systems should work with little or no modifications. The only
   Debian-specific features I'm relying on is the adm group and the
   savelog(8) command.

 - LVM2 if you want snapshots of non-btrfs filesystems (optional).

 - xfs-utils and xfsdump (optional, only if backing up XFS filesystems,
   will degrade to GNU tar if not present).

 - btrfs-tools (only if backing up btrfs filesystems).

 - GNU tar (only if backing up non-XFS filesystems).

 - Common UNIX commands like rm(1), mv(1), install(1), cp(1), df(1),
   gzip(1). You have these already unless you have a stripped-down
   system.

COMPRESSION

 Backups may be compressed using a compression tool specified in
 ohsnap.conf or automatically chosen. If auto, ohsnap will choose one
 with a bias toward efficiency. If you want speed, try lzop or gzip
 instead.

BUGS

 - Not portable to other GNU/Linux systems other than Debian and it's
   derivatives.

 - Snapshots filling up while backup in progress not handled.

 - Too specific to my situation.

 - Please report any findings.

vim:tw=75:sw=5:ts=5:et:nojs

Previous:sai