Thursday 28 April 2016

Backup problems

While messing around doing some maintenance, I noticed that two of my many backups weren't working. Specifically, I have three major backups, 1) done on the 1st to the 10th of the month, 2) from the 11th to the 20th and 3) from the 21st to the end of the month. So that means, even if something catastrophic happens and that gets copied to my backup, I can always go back 10 days to the previous version.

I've never actually needed this, but it makes me sleep more soundly.

What I noticed, was that the drives for 2) and 3) were full. I have no idea why. So I set up replacements for those drives and repopulated them from the main server, and they wound up at 60% full, which is correct.

The moral of that story is, occasionally you should check that your backups really are working.

Today, I wanted to set up a back of a server called giggi running Fedora core 15. The current version is 23, but if a system is working, I'm reluctant to upgrade the operating system - sometimes, upgrading the OS can cause problems. I chose a server called nelly as the backup server. I started it up, and it was running Yarrow (core 1). Yarrow is a version of Fedora that came out in 2003. So I must have set this computer up 13 years ago, and I haven't used it since then!

When I started nelly up, it was working fine. I thought about upgrading it to core 23, but thought, no. Sometimes, I've found that really new versions of Fedora don't work on some really old motherboards. Why ask for trouble?

So I checked that it was working, and then tried to do a backup.

I like to use rsync. I used to use a perl program called mirror, and I also have a backup program that I wrote myself, but rsync is fast, flexible, comes with the linux distribution and probably doesn't have any bad bugs in it. So I tried to use rsync, to back up giggi to nelly. I got "error in rsync protocol data stream (code 12)". Which can be translated as "incomprehensible error (code random number)".

After googling a bit, I guessed that this is caused by incompatible versions of rsync. Which pushes me towards installing core 23 on nelly. But I don't really want to do that unless I have to, so I thought a bit.

My first thought, was to use the perl program called mirror, and I installed that, and it worked fine, so that's a possibility. Bu then I had another thought.

I nfs-mounted the relevant directories from giggi to nelly. Now it looks as if the directories that I want to back up, exist on nelly - except that, of course, they don't. But then I used rsync to copy the files from the nfs-mounted tree to nelly, and that worked, because to do this, the rsync on nelly is talking to the rsync on nelly, and they're compatible (duh).

And the moral of this story - there's more than one way to do it!

No comments:

Post a Comment