SYNOPSIS

vbackup [OPTIONS] [ --check ] name

vbackup [OPTIONS] { --list | --help [module] | --version }

vbackup [OPTIONS] --rc --list [name]

vbackup [OPTIONS] --rc --init name

vbackup [OPTIONS] --rc { --add | --delete } config

vbackup [OPTIONS] --rc { --enable | --disable } config name

DESCRIPTION

vbackup is a program that performs system backups. The backup strategy is specified with a set of minimal configuration files that exist in directories under /etc/vbackup. See the quickstart section for quick first-time setup.

OPTIONS

-d <level>

Set the message level to <level> (default level is 8): 1: Fatal, 2: Error, 3: Warning, 4: Note, 5-7: Information (5: Rare messages, 6: Useful message, 7: Not so useful), 10-14: Debug messages that don't flood, 15-19: Debug messages that flood

--dir <directory>

Set the configuration directory. This is only useful in case you want to implement (e.g.) user backups, so each user may have her own configuration directory.

COMMANDS

In all commands bellow: <name> refers to the name of a backup strategy (e.g. 0, 5, test0, test5, etc). <config> refers to a configuration file name and it is in the form XX-NAME.TYPE where XX is a number indicating a priority, NAME is an arbitrary name and TYPE is the coresponding module name (e.g. xfsdump) (example: 50-home.xfsdump, 20-mbr.mbr, 10-remote.nfsmount, etc). <module> refers to a module name (e.g. xfsdump)

--check <name>

Check configuration files for a specific backup strategy (name). Each module checks its own configuration file.

--list

List all available modules, their version and a brief description.

--help [<module>]

Show some help. If a module is passed as argument then it will display some help about that module. This is where the module configuration parameters are shown.

--version

Guess what...

--rc --list [<name>]

List available backup types in the rc.d directory or (if name is specified) list enable scripts in a backup strategy. This is similar to browser the directories with ls.

--rc --init <name>

Create/initialize a new backup strategy. It will ask a couple of questions and then it will create the directory and populate it with a vbackup.conf file based on the answers.

--rc --add <config>

Add a new configuration file to the rc.d directory. It will ask a number of questions and the create the configuration file based on the sample file.

--rc --delete <config>

Delete an existing configuration file from the rc.d directory.

--rc --enable <config> <name>

Enable a configuration file for a backup strategy by creating a symlink.

--rc --disable <config> <name>

Disable a configuration file for a backup strategy by remove the symlink.

QUICKSTART

Use the vbackup-wizard(8) for quickstarting. Most probably that's what you will do the first time.

CONFIGURATION

The backup strategy is specified with a set of minimal configuration files that exist in directories under /etc/vbackup. Each directory is named backup.XXXXX where XXXXX is the name of the backup strategy.

For example, a simplistic backup strategy may have two directories named backup.0 and backup.5. Each of them will include configuration files that describe level 0 and level 5 system backups.

It is advised to have a directory named rc.d under /etc/vbackup that will hold all configuration files. After that, individual backup.XXXXX directories will only contain links to those files. It is absolutely sure that some files will be the same among different backup strategies and trying to keep them synchronized will be an uneeded pain.

Each configuration file must contain a vbackup.conf file that specifies some global configuration options (like a destination directory). Next, it must contain one or more module configuration files. The available modules can be seen using the --list parameter. Each configuration file is in the form something.modulename. It is suggested that something is in the form of NN-string where NN is a two (or more) digit number and string is a descriptive string. For example, a good name is "00-myserver.nfsmount". This clearly shows that a path in myserver will be mounted using nfs and it will help you when 2 years later you'll attempt to edit those files. The number prefix helps in determining the sorting order. All configuration files are examined in a sorted order.

The complete documentation is in the README files.

BACKUP

After having created at least one backup.XXXXX directory in /etc/vbackup, you can perform that backup by running "vbackup XXXXX". This will first source the vbackup.conf and it will then check for existing configuration files. For each one that is found, it will determine the appropriate backup module and run it.

MODULES

dpkg

Backup the debian package list. Small space requirement and very useful for restoring a debian system.

exec

Execute shell commands. Allows custom things to happen between steps (e.g. creating a tar of the whole backup directory or removing old backups).

exist

Check whether a file or directory exists. This can be used to determine whether a filesystem is actually mounted or not. It is strongly advised to use this when you're not using mount or nfsmount!

ftar

Use tar to backup a filesystem but use find to locate the files to backup. This is simillar to the tar method but is not that good for incremental backups. If you restore a system that was incrementally backed up using this method it will have all files that were deleted between intermediate backups too. The advantage of this method is that you can use regular expression to filter files that will be backed up.

mbr

Backup MBRs from all disks and their Partition Tables. It will also backup MD and LVM information if any of those is detected. Extremely useful with very low space requirements.

mount

Mount a local filesystem, in case you have an unmounted filesystem to perform backups (for example a spare or external disk).

mysql

Backup some or all MySQL databases.

nfsmount

Mount a remote filesystem using NFS.

off

Don't do anything at all. Very useful for disabling configuration files. For example, if you rename 50-main.pgsql to 50-main.pgsql.off it will remain in the configuration directory by will be disabled.

openldap

Backup OpenLDAP database and configuration (if it's stored in LDAP).

pgsql

Backup some or all PostgreSQL databases.

rm

Remove a directory recursively. Useful when storing the backup to a temporary directory before (e.g.) moving it to another system or compressing it.

rpm

Backup RPM database.

scp

Copy files to a remote system using scp. Very good to copy backups to a remote systep. It will copy directories recursively so it can be used to copy a full backup to a remote system.

tar

Perform incremental backups using the listed-incremental format of GNU tar. Use the --noplugin parameter when editing tar configuration files (!!!).

umount

Umount a filesystem that was previously mounted. This can be used for local and remote mounts. The configuration of this module is compatible with the configuration of mount and nfsmount modules. This means that you can just create a link to the coresponding mount configuration file to have it unount the filesystem. (For example, link 00-remote.nfsmount to 99-remount.umount)

x509

Encrypt a file or a directory using an x509 certificate. This way backups can be safely stored in remote systems.

xfsdump

Perform incremental backups using xfsdump. This is by far the very best way to backup an XFS filesystem (as a whole). It works extremely well, it is very reliable and it is able to do live backups. It is also very easy to restore all or part of the backed-up data using the interactive xfsrestore utility (xfsrestore -i).

EXTENDING

You can extend vbackup by writing very simple scripts that will be combined with other scripts. Read the README.dev file for more information and have a look at other modules.

AUTHOR - COPYRIGHT

vbackup is written and maintained by Stefanos Harhalakis. Copyright (c) 2006-2012 Harhalakis Stefanos

CONTACT

For bugs, requests, ideas, comments or anything else (except spam) contact <[email protected]>

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

If GPLv3 doesn't fit your needs (BSD?) feel free to contact me and I may release it with another license too.

RELATED TO vbackup…