TurnKey Linux Virtual Appliance Library

tklbam-restore: Restore a backup

SYNOPSIS

tklbam-restore [ -options ] [ <hub-backup> ] || path/to/backup/extract

ARGUMENTS

<hub-backup> := backup-id || unique label pattern

OPTIONS

--raw-download=path/to/backup/: Download backup to directory without doing a system restore

--time=TIME: Time to restore from

TIME := YYYY-MM-DD | YYYY-MM-DDThh:mm:ss | <int>[mhDWMY]

e.g.,

2010-08-06 - 2010, August 6th, 00:00
2010-08-07T14:00 - 2010, August 7th 14:00 UTC
6m - 6 minutes
5h - 5 hours
4D - 4 days ago
3W - 3 weeks ago
2M - 2 months ago
1Y - 1 year ago

--limits=LIMITS: Restore filesystem or database limitations

LIMITS := " LIMIT -1 .. LIMIT -N"
LIMIT := -?( /path/to/include/or/exclude | mysql:database[/table])

--keyfile=KEYFILE: Path to escrow keyfile.

Default: Hub provides this automatically.

--address=TARGET_URL: manual backup target URL (needs --keyfile).

              Supported storage backends and their URL formats:

              file:///some_dir
              rsync://user[:password]@other.host[:port]//absolute_path
              rsync://user[:password]@other.host[:port]/relative_path
              rsync://user[:password]@other.host[:port]::/module/some_dir
              s3://other.host/bucket_name[/prefix]
              s3+http://bucket_name[/prefix]
              ftp://user[:password]@other.host[:port]/some_dir
              ftps://user[:password]@other.host[:port]/some_dir
              hsi://user[:password]@other.host[:port]/some_dir
              imap://user[:password]@other.host[:port]/some_dir
              scp://user[:password]@other.host[:port]/some_dir
              ssh://user[:password]@other.host[:port]/some_dir
              tahoe://alias/directory
              webdav://user[:password]@other.host/some_dir
              webdavs://user[:password]@other.host/some_dir
              gdocs://user[:password]@other.host/some_dir

Default: Hub provides this automatically.

--skip-files: Don't restore filesystem

--skip-database: Don't restore databases

--skip-packages: Don't restore new packages

--logfile=PATH: Path to log file. Default: /var/log/tklbam-restore

--no-rollback: Disable rollback

--quiet: Disable feedback

--force: Disable sanity checking

--debug: Run $SHELL after Duplicity

USAGE EXAMPLES

       # Restore Hub backup id 1
       tklbam-restore 1

       # Same result as above but in two steps: first download the extract, then apply it
       tklbam-restore 1 --raw-download=/tmp/mybackup
       tklbam-restore /tmp/mybackup

       # Restore backup created with tklbam-backup --raw-upload=/srv
       tklbam-restore 2 --raw-download=/srv

       # Restore from Duplicity archives at a custom backup address on the local filesystem
       tklbam-restore --address=file:///mnt/backups/mybackup --keyfile=mybackup.escrow

       # Simulate restoring Hub backup id 1 while excluding changes to the /root path,
       # mysql 'customers' DB, and the 'emails' table in the 'webapps' DB
       tklbam-restore 1 --simulate --limits="-/root -mysql:customers -mysql:webapp/emails"

       # Simulate restoring only the /root files in Hub backup id 1
       tklbam-restore 1 --simulate --skip-database --skip-packages --limits="/root"

FILES

Hooks: /etc/tklbam/hooks.d