Skip to content

The Command Line Utility

Brian D. Burns edited this page Dec 18, 2011 · 3 revisions

The Command Line Utility

Ensure the Backup gem is installed

$ gem install backup

Commands

Below are a list of available commands and what they do.

Help

Bring up the available commands with:

$ backup help

Bring up details for a specific command with:

$ backup help <command name>

Perform - Triggering a backup procedure

Invoke the backup procedure with:

$ backup perform --trigger my_backup

If you want to invoke multiple backups at the same time, then provide multiple triggers, each separated by a comma.

$ backup perform --triggers my_backup_1,my_backup_2,my_backup_3

These will not invoke asynchronous, but in order, one after one in the order specified.

See Performing Backups for more information.

(Gem) Dependencies - Listing and Installing

To see a list of all the dependencies Backup depends on with:

$ backup dependencies --list

Here you can see what's needed, depending on what components of the Backup gem you're going to use.

If you need to install a particular gem, you can use:

$ backup dependencies --install <gem name>

And it'll automatically install the correct version of the gem, as specified in backup dependencies --list.

Note that when you try to run a backup that relies on for example the fog gem for interacting with Amazon S3, then it'll also inform you (detailed) how to install it and will also attempt to install it for you unless you manually kill the process in time. So while gem dependencies are no longer provided when installing the Backup gem, backup uses it's own little built in dependency manager to assist you.

Generate - Generating pre-populated configuration files

This is a VERY handy tool you should definitely leverage. It essentially allows you to generate a base Backup configuration file with all the possible values. Once generated, all you have to do is change and omit values and you're practically set!

See the Generator page for more information.

Decrypt - Decrypting backups that were encrypted with Backup (OpenSSL/GPG)

When you encrypt a backup file, you will want to decrypt it later in case you need to open one of your backed up files.

Consult the Encryptors wiki page for more information on both encrypts and how to decrypt them.

Version - Display the currently installed and used Backup gem version

$ backup version