TurnKey Linux Backup and Migration profiles https://www.turnkeylinux.org/tklbam
  • Python 55.5%
  • Shell 38.4%
  • Standard ML 6.1%
Find a file
Marcos Méndez 4e8a95956e
All checks were successful
tests / tests (push) Successful in 8s
security / security (push) Successful in 56s
Merge pull request 'ci: Forgejo workflows for git.pop.coop' (#4) from ci/forgejo-workflows into master
2026-10-14 19:53:38 -03:00
.forgejo/workflows ci: Forgejo workflows for git.pop.coop 2026-10-14 22:32:53 +00:00
.github/workflows ci: security scanning, with the findings read and justified 2026-10-07 18:19:02 +00:00
bin Finalized (and working) copy of buildtasks/bin/generate-tklbam-profile 2026-08-06 10:24:40 +10:00
hooks added migrate-slapd hook developed by Eric and Christoph Knittel 2014-06-07 20:21:04 +03:00
tests tests/coverage.sh: read COVERAGE_THRESHOLD when no argument is given 2026-09-26 09:10:29 +00:00
.gitignore separated builds into a separate project 2010-08-24 17:45:46 +03:00
ansible added ansible 2015-08-31 03:12:27 +00:00
appengine moved conf/* ./ 2010-08-24 17:31:38 +03:00
appengine-go added blank profiles for new appliances: drupal7, appengine-{python,java,go} 2012-05-13 12:46:34 +03:00
appengine-java added blank profiles for new appliances: drupal7, appengine-{python,java,go} 2012-05-13 12:46:34 +03:00
appengine-python added blank profiles for new appliances: drupal7, appengine-{python,java,go} 2012-05-13 12:46:34 +03:00
appflower added appflower 2012-06-21 13:13:00 +03:00
asp-net-apache renamed lamm, lemp and llmp 2012-08-20 12:04:18 +03:00
asp-net-core Commit new app profiles. 2020-11-23 17:38:13 +11:00
avideo Add 'avideo' profile ('youphptube' has been rebranded 'avideo'). 2020-05-27 12:31:52 +10:00
b2evolution added b2evolution 2012-07-09 19:16:56 +03:00
bagisto Add in new apps. 2020-12-02 17:32:05 +11:00
bambooinvoice added bambooinvoice 2012-06-25 19:12:10 +03:00
bookstack Add (empty) bookstack profile. 2022-04-28 15:25:05 +10:00
bugzilla moved conf/* ./ 2010-08-24 17:31:38 +03:00
cakephp added cakephp 2012-07-25 13:51:54 +03:00
canvas added canvas 2012-07-27 12:36:04 +03:00
clipbucket added clipbucket 2012-07-12 16:47:25 +03:00
codeigniter added codeigniter 2012-06-19 14:46:25 +03:00
collabtive added collabtive 2012-07-11 13:12:41 +03:00
concrete-cms Rename Concrete profile (concrete5 -> concrete-cms). 2022-09-01 06:34:00 +00:00
core Updates to base/core profile; mostly cosmetic, but also some functional adjustments 2026-08-06 10:21:27 +10:00
couchdb added couchdb 2012-06-28 12:49:29 +03:00
COVERAGE.md Raise the coverage threshold to 100, the measured number 2026-09-26 09:27:49 +00:00
deki Merge branch 'master' into beta 2010-08-24 17:46:08 +03:00
django moved conf/* ./ 2010-08-24 17:31:38 +03:00
dokuwiki Merge branch 'master' into beta 2010-08-24 17:46:08 +03:00
domain-controller moved conf/* ./ 2010-08-24 17:31:38 +03:00
drupal6 moved conf/* ./ 2010-08-24 17:31:38 +03:00
drupal7 Revert "moved drupal7/overlay/etc/tklbam/overrides to profile" 2013-09-02 18:26:37 +03:00
drupal8 added new apps for v14 2015-08-14 21:06:50 +10:00
drupal9 Commit new app profiles. 2020-11-23 17:38:13 +11:00
drupal10 Add (empty) drupal10 profile 2023-09-19 23:54:41 +00:00
e107 added e107 2012-07-08 14:15:16 +03:00
ec2sdk moved conf/* ./ 2010-08-24 17:31:38 +03:00
ejabberd moved conf/* ./ 2010-08-24 17:31:38 +03:00
elgg include Elgg data dir in backup - closes #1309 2019-03-15 06:58:30 +11:00
espocrm added new apps for v14 2015-08-14 21:06:50 +10:00
etherpad added nodejs and etherpad 2012-05-25 15:02:45 +03:00
faveo-helpdesk Add in new apps. 2020-12-02 17:32:05 +11:00
fileserver moved conf/* ./ 2010-08-24 17:31:38 +03:00
foodsoft added new apps for v14 2015-08-14 21:06:50 +10:00
foswiki add (empty) foswiki profile 2018-07-02 19:41:26 +10:00
gallery moved conf/* ./ 2010-08-24 17:31:38 +03:00
gameserver Commit new app profiles. 2020-11-23 17:38:13 +11:00
generic added generic dirindex.conf 2013-11-14 12:41:20 +02:00
ghost add ghost app 2016-05-19 13:28:28 +10:00
gitea add gitea 2018-08-27 16:44:36 +10:00
gitlab update gitlab profile in preparation for the updated gitlab appliance 2019-03-07 15:18:04 +11:00
gnusocial added new entries for renamed apps 2015-08-14 21:11:11 +10:00
ibexa Rename ezplatform -> ibexa as per app rename 2024-05-28 22:37:10 +00:00
icescrum added icescrum 2012-07-16 14:06:51 +03:00
invoice-ninja Commit new app profiles. 2020-11-23 17:38:13 +11:00
jenkins Add $JENKINS_HOME. 2020-09-01 16:46:05 +10:00
joomla moved conf/* ./ 2010-08-24 17:31:38 +03:00
joomla3 added new apps for v14 2015-08-14 21:06:50 +10:00
joomla4 Add new joomla4 profile. 2022-11-02 04:00:31 +00:00
joomla15 removed cache exclude from magento, empty profiles for joomla15, joomla16, statusnet 2011-01-13 21:06:16 +02:00
joomla16 removed cache exclude from magento, empty profiles for joomla15, joomla16, statusnet 2011-01-13 21:06:16 +02:00
joomla25 added blank joomla25 profile 2012-04-24 11:19:15 +03:00
kliqqi rename pligg -> kliqqi 2017-08-02 13:53:14 +10:00
lamp moved conf/* ./ 2010-08-24 17:31:38 +03:00
lapp added appliances with postgres 2013-09-12 17:17:45 +03:00
laravel added laravel: doesn't look like we need to backup any special locations 2014-06-07 18:10:37 +03:00
leantime Commit new app profiles. 2020-11-23 17:38:13 +11:00
lighttpd-php-fastcgi renamed lamm, lemp and llmp 2012-08-20 12:04:18 +03:00
limesurvey added limesurvey 2012-05-14 15:14:03 +03:00
lxc added lxc 2013-12-18 13:09:17 +02:00
magento added cache and sessions 2018-03-02 11:34:49 +00:00
mahara added appliances with postgres 2013-09-12 17:17:45 +03:00
mambo added mambo 2012-07-10 14:57:56 +03:00
mantis moved conf/* ./ 2010-08-24 17:31:38 +03:00
matomo rename piwik -> matomo 2018-08-27 16:09:29 +10:00
mattermost add mattermost profile (currently empty) 2016-05-22 16:58:12 +10:00
mayan-edms update mayan profile for v15.0 2018-10-01 12:42:47 +10:00
mediaserver Fix mediaserver profile - closes #1527. 2020-11-03 10:57:28 +11:00
mediawiki moved conf/* ./ 2010-08-24 17:31:38 +03:00
mibew added mibew 2012-06-20 14:24:29 +03:00
moinmoin Merge branch 'master' into beta 2010-08-24 17:46:08 +03:00
mongodb added mongodb 2012-07-23 16:33:25 +03:00
moodle moodle: drop stale /var/lib/moodle paths, skip moodledata caches 2026-09-22 15:59:04 +00:00
movabletype moved conf/* ./ 2010-08-24 17:31:38 +03:00
mumble add mumble (not sure why it wasn't there already?) 2017-11-23 11:12:44 +11:00
mysql moved conf/* ./ 2010-08-24 17:31:38 +03:00
nextcloud add (non-standard) nextcloud webroot - closes #922 2017-08-11 09:26:08 +10:00
nginx-php-fastcgi renamed lamm, lemp and llmp 2012-08-20 12:04:18 +03:00
nodejs added nodejs and etherpad 2012-05-25 15:02:45 +03:00
observium added observium 2013-10-17 19:43:59 +03:00
odoo add odoo data path 2022-06-08 04:09:28 +00:00
omeka added omeka 2012-07-22 16:14:21 +03:00
opencart add (blank) opencart profile 2019-01-15 19:24:15 +11:00
openldap added openldap 2012-07-19 12:10:49 +03:00
openphoto added openphoto 2012-06-24 15:49:07 +03:00
openvas update OpenVAS tklbam-profile to include local data 2017-08-02 15:26:08 +10:00
openvpn added openvpn 2013-08-29 17:22:57 +03:00
orangehrm added orangehrm 2012-06-14 12:59:33 +03:00
oscommerce added oscommerce 2012-07-08 17:26:59 +03:00
osqa added osqa 2012-06-10 12:14:24 +03:00
otrs moved conf/* ./ 2010-08-24 17:31:38 +03:00
owncloud actually, backup all /var/lib/owncloud - includes local backups, themes and other assests 2017-05-03 13:18:38 +10:00
phpbb moved conf/* ./ 2010-08-24 17:31:38 +03:00
phplist added phplist 2012-05-20 14:06:28 +03:00
phpnuke added phpnuke 2012-07-09 17:13:09 +03:00
phreebooks added new entries for renamed apps 2015-08-14 21:11:11 +10:00
phreedom added phreedom 2012-07-09 13:06:52 +03:00
plone added plone 2012-05-16 17:50:48 +03:00
postgresql added appliances with postgres 2013-09-12 17:17:45 +03:00
prestashop added profile confs for magento, prestashop and vtiger 2010-12-31 01:50:40 +02:00
processmaker added processmaker 2012-06-06 13:54:29 +03:00
processwire Add profile for new appliance; processwire (blank). 2022-09-01 06:34:44 +00:00
projectpier moved conf/* ./ 2010-08-24 17:31:38 +03:00
punbb added punbb 2012-07-24 15:41:42 +03:00
rails moved conf/* ./ 2010-08-24 17:31:38 +03:00
README.md Refactor/update readme and convert to md file 2026-08-06 10:25:11 +10:00
redis add (empty) redis profile 2019-06-13 16:29:04 +10:00
redmine exclude /var/www/redmine/tmp from backup 2013-10-15 07:48:21 +03:00
revision-control moved conf/* ./ 2010-08-24 17:31:38 +03:00
roundup Modifie roundup profile 2018-06-19 17:38:35 +00:00
sahana-eden added web2py and sahana-eden 2012-05-31 18:26:01 +03:00
sencha added sencha 2012-06-22 13:48:37 +03:00
silverstripe added silverstripe 2012-06-13 16:25:00 +03:00
simpleinvoices added simpleinvoices 2012-06-29 12:58:04 +03:00
simplemachines added simplemachines 2012-07-10 19:30:43 +03:00
sitracker added sitracker 2012-06-19 19:15:14 +03:00
snipe-it Commit new app profiles. 2020-11-23 17:38:13 +11:00
statusnet removed cache exclude from magento, empty profiles for joomla15, joomla16, statusnet 2011-01-13 21:06:16 +02:00
sugarcrm added sugarcrm 2012-05-15 11:56:11 +03:00
suitecrm added new apps for v14 2015-08-14 21:06:50 +10:00
symfony exclude symfony cache 2012-04-24 11:18:43 +03:00
syncthing add syncthing profile (empty) 2018-07-05 22:41:55 +00:00
tendenci added appliances with postgres 2013-09-12 17:17:45 +03:00
tkldev Actually, I think this needs more thought. 2022-04-28 20:44:09 +10:00
tomatocart added tomatocart 2012-05-23 14:04:04 +03:00
tomcat fix tomcat profiles for v14.x 2016-02-19 13:38:55 +11:00
tomcat-apache fix tomcat profiles for v14.x 2016-02-19 13:38:55 +11:00
torrentserver Merge branch 'master' into beta 2010-08-24 17:46:08 +03:00
trac Merge branch 'master' into beta 2010-08-24 17:46:08 +03:00
tracks moved conf/* ./ 2010-08-24 17:31:38 +03:00
twiki twiki no longer installed from package but from upstream 2010-10-21 11:25:54 +02:00
typo3 added typo3 2012-06-17 14:47:13 +03:00
ushahidi added ushahidi 2012-05-22 13:22:05 +03:00
vanilla added vanilla 2012-05-17 16:45:51 +03:00
vtiger added profile confs for magento, prestashop and vtiger 2010-12-31 01:50:40 +02:00
web2py added web2py and sahana-eden 2012-05-31 18:26:01 +03:00
wireguard Commit new app profiles. 2020-11-23 17:38:13 +11:00
wordpress Add default WordPress cache location to TKLBAM profile. Closes #1411. 2020-04-03 18:03:19 +11:00
xoops added xoops 2012-06-18 14:13:57 +03:00
yiiframework added yiiframework 2012-06-13 13:31:29 +03:00
youphptube add youphptube 2018-10-15 11:01:22 +11:00
zencart added zencart 2012-06-18 18:56:39 +03:00
znuny Add the Znuny backup profile 2026-09-02 13:55:53 +00:00
zoneminder add zoneminder profile - include all videos and images by default 2018-07-16 15:49:10 +10:00
zurmo added zurmo 2012-06-12 19:26:51 +03:00

Overview

This repository contains:

  1. Profile hooks in hooks/

    TKLBAM supports profile level hook scripts which live inside the profile. They work just like the hooks in /etc/tklbam/hooks.d except that they need to be cryptographically signed by the TurnKey release key for security reasons.

    The idea is to use this to build up a library of hooks that are useful during migration (e.g., stopping/starting services to prevent serialization issues, tweaking a configuration file or upgrading a database schema, etc.)

    We don't use this enough yet, but the infrastructure is there ready to use and contributions are welcome.

  2. Path includes/excludes configurations in the top-level

    These are the plain text top-level configuration files which we use to determine which paths to index changes when appliance specific TKLBAM profiles are generated. The tklbam-profile configurations are essentially a base /etc/tklbam/overrides file which ships with TKLBAM.

    Each TurnKey app has its own configuration file that includes or excludes filesystem paths. You may notice that most of the app specific profiles are empty. This is because all appliance specific tklbam-profile config files depend on the 'core' profile. The 'core' profile is quite extensive so most appliances do not need any additional TKLBAM backup paths. When no additional paths are required, an empty file is all that is needed.

What paths are we scanning changes to?

As per the embedded documentation from tklbam internal create-profile command, in principle, we want to track changes to the user-servicable, customizable parts of the filesystem. E.g.:

  • /etc
  • /root
  • /home
  • /usr/local
  • /var/www
  • /opt
  • /srv

And ignore common cache & temp paths and areas maintained by the package management system.

  • /tmp
  • /run
  • /var/run (symlink to /run in modern Debian)

FYI general filesystem paths are described by the "Filesystem Hierarchy Standard".

Why not backup everything?

TKLBAM was originally designed to make it easy for users to only backup the delta (i.e., changes) from a known/fixed installation base (i.e. changes made to a TurnKey appliance). Despite this, with a custom profile it should be useful for backups on vanilla Debian and other Debian based systems.

By default a backup only includes your data and configurations, plus a list of new packages you've installed. Later when you restore these will be overlaid on top of the new appliance's filesystem and the package management system will be asked to install the missing packages. This minimizes the size of the backup, while ensuring your important data is included.

By contrast, If you backup the entire filesystem TKLBAM won't be able to help you migrate your data and configurations to a newer version of an appliance. The restore will just run everything over. At best you'll end up with the old appliance in a new location. But more likely you'll end up mixing the old and new filesystems and break things.

Limitations

  • Migrating data to newer major version TurnKey appliance (e.g. v18.2 => v19.0) may require some manual adjustment, most likely updated config in /etc. We suggest that you try a restore to a new server first and test. If there are problems, it is often better to do a 2-stage restore; first download your backup, then only restore specific paths. See tklbam-restore docs for more details.

  • Most Debian packages use /var/lib/PKG_NAME as a user data store. If you install additional packages it is important to be aware that occasionally that dir may contain data you may want to backup. Testing by a backup restore to a "clean" TurnKey server of the same version will assist you to confirm whether you need to add a path to your /etc/tklbam/overrides file or not.

More detail

$ tklbam internal create-profile --help
Syntax: create-profile [ -options ] output/profile/ <conf>
Create custom backup profile

What is a backup profile?

A backup profile is used to calculate the list of system changes that need to
be backed up (e.g., new files and packages). It typically describes the
installation state of the system and includes 3 files:

* dirindex.conf: list of filesystem paths to scan for changes
* dirindex: index of timestamps, ownership and permissions for dirindex.conf paths
* packages: list of currently installed packages.

[ .. snip ..]

See also ./bin/make-profile --help (a copy of buildtasks/bin/generate-tklbam-profile)