Creating a server Image solution

Hi All…
I’m going to migrate a mail system to a bigger server and for the past few months I’ve been living by the skin of my teeth when it comes to backups. All data files are backup fine but if the server ever needed rebuilding it would take a few days. So I’m looking for an image solution that I can install on the new server before I start building/migration. Something that will sit in the background and a corn job would start the imaging the server and send it to a store. Or maybe have the new server as a client for the solution and the image is running from another small Linux box. Has anyone got any thoughts or been down the same road as I’m about to walk down? lol

thanks & regards

Hi Martin,
Backups tend to be, dare I say “subjective” in terms of what people want or expect. For mail-server migration where files are typically held on the filesystem (courier for example) an rsync in advance, followed by taking the server down and a final rsync tend to work well with minimal downtime. Different story however if you have a db backed store like Zimbra, in which case a (more complex) server-to-server backup might be in order.

If it helps, I use the following script for backups, this works well for random backups but can also works for migrations, you would just need to adjust “HERE” to be the target of your backups, and obviously a ssh connection between the servers.

BACK=date "+%A_%d_%B_%Y_%H"
OPTS=“–sparse --force --ignore-errors --delete-excluded
–bwlimit=4096 --delete --backup
mkdir -p ${HERE}/current
touch ${HERE}/${EXCL}
nice -n19 rsync ${OPTS} root@${HOST}:confused: ${HERE}/current

Your “current” backup is left in ${HERE}/current, and for each backup you do, old / replaced files are left in time+datestamped folders, so you have a history of what’s changed. Nice makes it run at a lower priority so it doesn’t kill your machine, and bwlimit stops it from using too much broadband, probably remove this is you run locally. Any files you want to exclude from the backup, list them in “${HERE}/.excludes”.

Use at your own risk - make sure you test it on non-critical files and understand what it does before trying it on live data.

thanks Mad Penguin for getting back to me… The data files are fine I back them up and store them in two location one here in the UK and the other in Germany. I have moved away from using a VPS to DS and doing so has takes away the snapshots and with some providers the daily/weekly image backups. So need to have something to replace those options. thanks again for your thoughts!

Ok, so imaging a DS in itself can be problematic, especially if you want to do a restore and don’t have hands on. If you want actual images, what about virtualising your DS and running your mailserver in it’s own VM. If you were to do this with KVM for example you would get easy access to the raw images for backup (and restore) and also snapshot facilities. (example screenshots attached) Unless your mail-server is unusually performance sensitive, typically you’re not going to see any difference relative to running it native. You can automate both snapshots and image backups from the command line (or CRON) using “virsh” (and it does have specific support for ‘hot’ image backups)
I’m saying KVM, but if you have direct access to the machine, ProxMox provides a pretty comprehensive bare-metal solution which adds all sorts of bells and whistles above and beyond standard KVM, not used it in a few years but I’d be fairly confident is will have a number of ‘hot’ backup options.

Now that’s damn good idea!! The DS is a beefy one and if I run say VM workstation pro I could migrate other (but small) VM’s across. Should save a few bob! I’ll let you know how it pans out. Thanks Bud :wink:

Mmm, not entirely sure why you’d want to run virtualisation on Windows when the vast majority of the World runs it on Linux, but hey, it should also work. Not aware that VMware will do anything KVM or ProxMox don’t, other than take money off you for Windows and VMware licenses (!)

It won’t be running on MS (that’s the last platform I would use) it will be VMware for Linux then playing around with it.

Mm, so now I’m intrigued. Most Linux distro’s come with virtualisation “out of the box”, Ubuntu for example comes with KVM/Libvirt/libvirtmanager which allows you to manage lots of VM’s distributed over multiple servers. Proxmox for a more enterprisey solution … what do you get from VMWare for Linux that doesn’t come with the free options? Kinda feels like there must be something significant for people to pay and be subject to a relatively restrictive license, but it’s not something I’m aware of?

I used VMWare server for Linux many (15?) years ago, just because I had some .vmdk machine images to load up, but I sort of thought since then it had died off … mostly an assumption, but I couldn’t really see the point of paying for something what was “built-in” and free?