toucan's picture

(first a disclamier, tklbam is really really nice. Thank you so much for this functionality!)

I might be doing something wrong so maybe there are nice ways around these suggestions. But it would be nice if:

1. Scripting passphrase:

One could script entering a passphrase. Currently you have to enter tklbam-passphrase "by-hand" on each machine which is brought up. It would be nice to be able to call eg:

tklbam-passphrase --file=~mybackupkey

(I guess one could copy out the /etc/tklbam and /var/lib/tklbam directories from a similar clone which has had the tklbam-passphrase entered. But that is kind of ugly.)

2. Allow easier backup profiles:

Currently to do a backup of a set of directories one has to do something like:

cp -a /etc/tklbam /etc/tklbam.mydirs
cp -a /var/lib/tklbam /var/lib/tklbam.mydirs
export TKLBAM_REGISTRY=/var/lib/tklbam.mydirs
export TKLBAM_CONF=/etc/tklbam.mydirs
echo mydir >> /etc/tklbam.light/overrides
echo myotherdir >> /etc/tklbam.light/overrides
echo someotherdir >> /etc/tklbam.light/overrides
tklbam-init --force-profile=empty
tklbam-backup --skip-packages --skip-database

Then in day to day usage of backing up these dirs I need to do:

export TKLBAM_REGISTRY=/var/lib/tklbam.mydirs
export TKLBAM_CONF=/etc/tklbam.mydirs
tklbam-backup --skip-packages --skip-database

This is a bit involved. I can sort of script this a bit but it might be nice if there were a nice way to just backup and restore a given list of directories.

3. Pass profile on the command line:

Would it be possible to somehow unify the configuration directories and be able to pass the profile to tklbam-init and tklbam-backup. Something like:

tklbam-init --profile=mydirs APIKEY
tklbam-backup --profile=mydirs

And then have some way to alter the contents in the mydirs profile. This would circumvent the use of the env vars etc.


Ohh and the other suggestion of course in the thread I just posted to be able to change the label on each of the backups!

In any casse these are just some suggestions... Thank you so much for the functionality!!

Jeremy Davis's picture

I didn't really elaborate in my other post and perhaps you already knew, but TKLBAM was developed specifically for TurnKey Linux (the acronym is TurnKey Linux Backup And Migration). The functionality to be able to use it on vanilla Debian and derivatives such as Ubuntu has been a relatively new development (part of our push to become more integrated with; and contribute back more to upstream development). So whilst it has been tested, some of the issues/suggestions you have raised have perhaps not been previously considered. But in light of our hopes to eventually have some version of TKLBAM (perhaps with a revised name) included in the default repos of at least Debian, if not Ubuntu as well, they are definitely worthy of consideration.

But in answer/response to your specific questions/suggestions:

1) Probably not a bad idea, even if it just accepted a passphrase as an argument. I guess in the short term you could workaround your issue using the --random switch and catch the terminal output (the random passphrase is printed on the screen by default).

2) I think that you can work around this issue by either using the filesystem overrides (if you are using an 'empty' ID profile) or creating a custom profile (adding your desired backup locations), then initialising TKLBAM with your new custom profile. The obvious advantage of using a custom profile is that you can then reuse that same profile on other systems that have the same backup requirements. Also if you use a 'empty' profile ID then AFAIK TKLBAM won't do proper incremental backups (although I could be wrong on that... regardless thaey will be bigger backups...). Obviously the custom profile option would be my suggestion.

3) AFAIK once TKLBAM is initialised with a profile, tklbam-backup will just use it (until/unless it is re-initialised); it shouldn't need to be (re)declared at backup (or restore).

Let me know how you go with it all, and FYI if you have specific issues/suggestions we have an Issue Tracker on GitHub (it was good to post here first anyway to discuss it...). I was planning on adding some TKLBAM feature requests (following your posts) but haven't got there yet. Feel free to beat me! :)

Add new comment