TurnKey Linux Virtual Appliance Library

tklbam-backup: Backup the current system


tklbam-backup [ -options ] [ override ... ]


<override> := <filesystem-override> | <database-override>

Overrides are usually configured in /etc/tklbam/overrides.

Filesystem overrides

<filesystem-override> := -?/path/to/include/or/exclude

This includes or excludes additional files and directories from being backed up if they've changed since installation.

Overrides defaults in /var/lib/tklbam/profile/dirindex.conf


  • If you add a directory handled by package management this may break package management on the system you restore to.
  • Only changes (e.g., new files, edited files, deleted files) from the base installation are included in a backup.


# exclude log files in /var/www

# ignores changes to webmin configuration

# include the contents of an external hard disk...

Database overrides

<database-override> := -?mysql:database[/table]

By default ALL databases are backed up. Adding a positive override changes the default behavior so that only the database or table specified in the override is included in the backup.

You can mix positive overrides with negative overrides.


# exclude Drupal6 sessions table

# only include drupal6 database


  • --address=TARGET_URL: manual backup target URL. Default: automatically configured via Hub
  • --simulate, -s: Simulate operation. Don't actually backup. Useful for inspecting /TKLBAM by hand.
  • --quiet, -q: Be less verbose
  • --logfile=PATH: Path of file to log output to. Default: /var/log/tklbam-backup

Configurable options

  • --volsize MB: Size of backup volume in MBs. Default: 50
  • --full-backup FREQUENCY: Time frequency of full backup. Default: 1M <frequency> := <int>[DWM]

    3D - three days
    2W - two weeks
    1M - one month

Resolution order for configurable options

  1. comand line (highest precedence)
  2. configuration file (/etc/tklbam/conf):
    # comment
    <option-name> <value>
  3. built-in default (lowest precedence)


  • Configuration files: /etc/tklbam/overrides, /etc/tklbam/conf, /etc/tklbam/hooks.d
  • Local cache of profile: /var/lib/tklbam/profile


If I do not want TKLBAM

If I do not want TKLBAM backup any MySQL databases, how am I going to do that?