Bryan's picture

I have been running a range of turnkey appliances for nearly (or perhaps slightly longer than) 6 years...as you can imagine some of them are getting rather dated. Updates from ubuntu are becoming sketchy, and some of the servers have a tendancy to lock up from time to time. So I want to upgrade...but am concerned that the age of the servers may preclude an easy upgrade.

Question #1: Based on my readings, what I need to do is use tklbam to create a backup file, then load that backup file into the new appliance. This help file seem to suggest that the whole process requires 4 commands - two run on the old appliance, two on the new. Is this correct, or is this help file missing steps?

Question #2: Given the rather anchient age of my current appliances, will this still work (tklbam appears to be on all applioances)?

Question #3: Several of the VM's are 32-bit, can I use TKLBAM to upgrade to 64-bit, or do I need to stick with 32-bit?

Thanks

Bryan

Forum: 
Jeremy Davis's picture

#1 Generally we recommend using TKLBAM with S3 storage (the default). However in your usage scenario (just using it as a migration tool) using local storage certainly makes more sense. So yes that should work fine. Alternatively you could just dump the data straight to a file location and then restore from the dump. If you use a USB stick (or some other removable storage) then that'll work fine. Otherwise make sure that you use something that maintains permissions (e.g. rsync or tar) when you transfer the files from the old server to the new.

FWIW here are the commands:

# on old server; USB mounted to /mnt; backup being stored /mnt/backup
tklbam-backup --dump=/mnt/backup

# on new server; USB mounted as above
tklbam-restore /mnt/backup

#2 You'll need to define "work" before I can accurately answer that! :) Essentially it should "just work", but that's in the context of collecting together a bunch of files that are probably important, dumping them in a file location. Then the restore on the other ends, puts them back where they came from...

It is quite likely that migrating from really old servers to current ones; that you'll need to manually tweak some things. Please see our docs for a suggested workflow and some considerations.

#3 In theory yes it should work. In practice, perhaps but I'm not sure... There's only one way to find out though! :)

Like is suggested in that doc page, IMO the first thing to try is a full restore. If that doesn't work, then start trying a partial restore. As mentioned in some scenarios (like really old servers) it may actually be easier to just manually restore files from your backup.

If you are migrating from a version pre v12.x then please also be aware that the underlaying OS changed (v11.x and earlier was Ubuntu; v12.x+ is Debian) and even though they are similar there are differences too. So you may find packages that change names or may not even be available anymore. You may also hit something similar going from 32 to 64 bit. I.e. slightly different package names - if it includes "32" that's probably a give away!

I'm guessing though that after ~6 years of usage you're probably getting a pretty good handle of Linux, so you should go pretty well.

Unfortunately it's almost impossible to suggest to you what will work best so it will be a bit of trial and error I suspect.

Please feel free to post at any point. I can't guarantee that I'll have all the answers but I'll do my best. Actually you may even want to share your notes after you're done for the benefit of others?

Bryan's picture

So here's an issue that I wasn't expecting. I have a wordpress (debian install, version 12) which is loosing its network connection, as others have posted about here previously:

https://www.turnkeylinux.org/forum/support/20140812/error-establishing-d...

(sometimes I get the no database connection error, other times it becomes completely unresponsive). This is one of the servers I want to move the content of to a new install (which, I presume, has fixed this error). I tried using a wordpress plugin for exporting the entire site (normal wordpress export doesn't do iamges or themes - cause that's useful :( ), but even after quadrupeling the server memory, it still crashes when I try to export in this fashion, presumably due to the above error.

So now I am trying TKLBAM...but to do so I need to install guest additions. Following the normal instructions, which have never before failed me, I first get an error stating that I've installed the guest additions from a different source...which I haven't. When I tell it to install the new additions anyways I get the following error:

Copying additional installer modules ...
./install.sh 361: bzip2: not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
./install.sh 362: bzip2: not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

And despite the systems claim that I have the additions added, I cannot mount a shared drive.

Trying to install bzip2 using apt-get finds the package, but claims the package cannot be verified, and when I tell it to install anyways I get this error:

Err http://cdn.debian.net/debian/ squeeze/main bzip2 amd64 1.0.5-6+squeeze1
404 Not Found [IP: 207.210.46.249 80]
Failed to fetch http://cdn.debian.net/debian/pool/main/b/bzip2/bzip2_1.0.5-6+squeeze1_amd64.deb  404  Not Found [IP: 207.210.46.249 80
]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Any ideas how to make this work?


Jeremy Davis's picture

Hi, sorry for such a delayed response. I honestly thought I'd already responded to this post, but I must have forgotten to click save! :(

If you note on the thread you link to, the problem is that the VM is running out of RAM. Why not just give your existing server more RAM? Migrating is still worthwhile IMO but at least it should be much more stable while you are working on it.

Also one of the first things to do to resolve RAM related issues with WordPress is remove all the plugins that you aren't using. Often WordPress memory leaks are caused by poorly coded plugins...

And why do you need to install guest addons for Virtualbox to use TKLBAM? Why not just run a TKLBAM dump to disk then tar the files. So rejigging what we had before:

# on old server; backup being stored /mnt/backup

tklbam-backup --dump=/mnt/backup
cd /mnt
tar -cvzpf ~/backup.tar.gz backup

# sftp into your old server and download '/mnt/backup.tar.gz'

# sftp into your new server and upload backup.tar.gz to /mnt
# on new server

cd /mnt
tar -xpvzf backup.tar.gz
tklbam-restore /mnt/backup
Filezilla is my SFTP client of preference, but there are plenty of options.

FWIW the error you are having trying to install stuff is because Debian Squeeze (the basis of v12.x) is no longer supported. As a short term workaround, you could adjust the sources list to use the Debian archive.

Bryan's picture

Migration was successful, and it seems to have solved the crashing issue - thank you for all your help.

Bryan


Jeremy Davis's picture

Awesome! Glad to hear that fixed your issue and thanks for the feedback.
Bryan's picture

I need the extensions so that I can then dump the file off of the server (although I now realize I could also do that via one of the other interfaces).

Adding memory has helped, but merely delays the time to the crash. Reading back in previous threads, it appears this was an issue with the older wordpress turnkeys, as they did not have one of the servers configured optimally.

I'll give it a shot and see what works.


Add new comment