maec's picture

I have multiple TKL Core appliances on Proxmox as containers. They are each modified (packages added; no lower level changes) and used as baselines for creating development servers. All of these containers were created by doing a restore from a backup of the original TKL Core appliance container. This results in the same Proxmox node name for each.

TKLBAM backups were enabled on Webmin for each of these.

Now the problem:  On the Hub dashboard I have only one appliance, Backup ID 1, Profile "turnkey-core-14.1-jessie-amd64" and one set of backups. There is more than one backup per day, so I'm assuming all the appliances' backups are part of this one backup set.

How do I make the appliances distinct to tklbam so I get a separate backup for each?

Jeremy Davis's picture

TKLBAM should automatically know that it's a new server and not your old one so each Core server should have it's own TKLBAM record within the Hub.

To check this I suggest that you manually run a full backup on one of the servers and see what happens in the Hub. A new record should appear (if it doesn't already). Note though that it will have the same name within the Hub but it should be a different BackupID.

maec's picture

Hi Jeremy,

Here are the entries from the Hub showing the backup I just did from Webmin (Webmin has “Run Backup”, not full or incremental) for a server created yesterday called BRAP-FULL. It's 34.8KB at 18:05:59. I changed the server name from the original BRAP-Stack to BRAP-FULL to help distinguish them.
34.8 KB (inc) Tue, 31 May 2016 18:05:59 UTC
728.7 KB (inc) Tue, 31 May 2016 06:05:41 UTC
952.4 KB (inc) Mon, 30 May 2016 14:05:31 UTC
299.8 KB (inc) Mon, 30 May 2016 05:05:16 UTC

 Near the end of the log output on Webmin are lots of lines like these:

Added incremental Backupset (start_time: Fri Apr 22 14:09:34 2016 / end_time: Fri Apr 22 14:11:04 2016)
*** Note that this server, BRAP-FULL, did not exist on Apr 22th.
And these:
Ignoring incremental Backupset (start_time: Mon May 30 14:22:31 2016; needed: Thu May 19 05:02:34 2016) 
Added incremental Backupset (start_time: Mon May 30 14:22:31 2016 / end_time: Tue May 31 06:58:41 2016) 
Last full backup date: Fri May 20 04:08:09 2016 
*** Note that this server, BRAP-FULL, did not exist on May 20th, but that is one month since BRAP-Stack’s last full backup.
“(1) BRAP Stack”, “Backup ID 1" is the only server listed on the hub of the four TKL Core’s that I backup daily. The servers are not all up all the time, so they would not have backups for every day.

... oh, here's a thought: since BRAP-FULL was restored/created from a Proxmox backup of BRAP-Stack, it would have "inherited" the TKLBAM backup history (they are identical containers). If that's the case, maybe there's a way to reset it -- ?

... and after some reading it seems the "Backup ID" may be involved. For each of my servers, Webmin shows the Backup ID as "#1" on the TKLBAM page, which is the Backup ID on the Hub. Now where is the ID kept ... and how to set it to distinguish the servers ...

/var/lib/tklbam/hbr has the backup id

I've changed it to a new ID number and it seems to be creating a distinct backup. If I find out otherwise I'll update.

Thanks for riding along....


Jeremy Davis's picture

In my experience, a new server should auto create a new Hub backup record. Although it makes sense that it might still keep the backup history of the original server.

Regardless of what it "should" do it sounds like you've found a suitable workaround! :)

maec's picture

I think that's the problem: These aren't "new servers creating a new Hub record". Looks like the reason for the duplicate Backup ID is because these are Proxmox container servers that are restored/duplicated/created as new container-based servers on Proxmox -- then backed up to the Hub. I'm guessing the smarts of the Hub's "restore to a new server" *installs* the server (running init scripts, setting a new Backup ID, etc) vs just creating an identical copy as I've done in Proxmox.

I've looked at man pages and forum posts but don't see what needs to be done to a "Proxmox container server copy" to turn it into a unique server -- turnkey-init? hub-init? I'm assuming there's more uniqueness on a TKL server than just the Backup ID (security settings, etc).

Re my original difficulties: One red-flag that I now realize is when running tklbam-init, on the Proxmox container duplicate server, it replied TKLBAM was already initialized -- since tklbam-init had already been run on the original server and this was a Proxmox duplicate server. As opposed to when doing a restore to a new server from the Hub there is no Backup ID until tklbam-init is run.

Jeremy Davis's picture

So they're actually clones of an old server NOT new servers! :) The Hub's "restore to a new server" launches a new (AWS) server and restores your backup to it.

What you explained is exactly what I would have suspected! If you launch a NEW server and restore a TKLBAM backup to it (like hte Hub does), it will automatically create a new backup ID! If you launch an old server (be it an existing server or a new server made from a clone/backup of an old server) then it is an old server, not a new one! :)

There isn't a way to turn an old server back into a new server. If you want a new server, why not just launch a new server? Then you can restore your TKLBAM backup to it and it will be similar to your other server (but the Hub will see it as a unique server and all the special secrets will be unique).

Jeremy Davis's picture

AFAIK Proxmox backups support hook scripts. So I'm sure that you could create a script that removes the TKLBAM association when it makes a local backup. Then you could use TKLBAM for backups but still use Proxmox for your throw-away servers.

Regardless though, it's a good idea to test your TKLBAM backups regularly to make sure that when you need it it will work as you expect it to.

Add new comment