These last few weeks we've been using Zmanda to backup our mysql databases,
replacing the filesystem backups we were doing before.
I recently needed to recover a server using amanda/zmanda. All I had to do for
the mysql database was create a single user in a newly installed copy of mysql
before asking Zmanda to restore all data. All data restored to dattabase while
amanda/gnu-tar restored all the filesystem. Services restarted, backup and
running.
Have a look at zmanda / amanda in parallel.
Rob
--
Rob Dyke
Technologist
Comwifinet Limited
Office: +44(0)8715206606
Mobile: +44(0)7730496667
http://www.comwifinet.com
mailto://rob AT comwifinet DOT com
----- Original Message -----
From: "Chris Hoogendyk" <hoogendyk AT bio.umass DOT edu>
To: "Frank Smith" <fsmith AT hoovers DOT com>
Cc: "fedora" <zuki AT abamon DOT com>, amanda-users AT amanda DOT org
Sent: Wednesday, November 21, 2007 2:04:12 PM (GMT) Europe/London
Subject: Re: can amanda backup symlink?
Frank Smith wrote:
> fedora wrote:
>
>> Hi huys..
>>
>> I have 2 situations:
>>
>> 1) default directory for MySQL is /var/lib/mysql. If this directory is link
>> to /var2/db/mysql and if I put /var/lib/mysql in disklist, can amanda do
>> backup? I think this should be can backup. May I know which directory is the
>> best to put in disklist for this case?
>>
>
> Amanda will back up the link, but you probably want it to back up the data,
> so you should use /var2/db/mysql as your disklist entry. Or you may want
> both, so if you are rebuilding the entire server you would get the link
> as well, but in that case you might want most or all of /var and not just
> the database link.
>
>> 2) how about this one. In /var/lib/mysql has databases but certain databases
>> in linking to /var3/mysql like:
>>
>> lrwxrwxrwx 1 root root 42 May 16 2007 AngelClub ->
>> /var3/mysql/AngelClub
>> drwx------ 2 mysql mysql 4096 Nov 13 11:55 BabyMobile
>> drwx------ 2 mysql mysql 4096 Nov 13 11:55 BestClub
>>
>> If I put only /var/lib/mysql in disklist, can amanda backup for /var3/mysql?
>> Or should add both /var/lib/mysql and /var3/mysql in disklist? Please
>> advise.
>>
>
> You would need both. /var/lib/mysql would pick up the BabyMobile and
> BestClub databases, but would only record the link to AngelClub and not
> the database itself, so you would have to add /var3/mysql/AngelClub to
> get that database.
This requires just a bit of clarification.
Amanda calls on native tools to do the backups. On Solaris, people
typically choose to use ufsdump. On Linux, people typically choose to
use gnutar. So the question depends on the behavior of those tools and
possibly the parameters Amanda calls them with, though I doubt Amanda
would call gnutar with --dereference and --create.
ufsdump will faithfully backup a partition. That is, it backs up links
as links and restores them as links. It backs up mount points as mount
points and doesn't follow them into other mounted partitions. It deals
properly with weird things such as doors. So, to paraphrase, when you
ask ufsdump to do a partition, you get the partition, the whole
partition, and nothing but the partition.
I'm less familiar with all the gnuances of gnutar, and some people will
substitute star or a wrapper of their own. But gnutar will typically
backup a symlink as a symlink, though it has parameters that can be
tweaked to do otherwise. Gnutar also typically follows mount points into
other mounted partitions, though I'm going to take a guess that Amanda
passes it the parameter that tells it not to do that. It would seem
contrary to the concept of the way DLE's are configured to have gnutar
expanding mount points.
Aside from the above, I go along with Frank's response.
In addition, you should read the backup reports. Check the sizes of your
partitions with `df -k` and then compare those with what the Amanda
reports as the amount of data having been backed up. See if they make
sense. And do trial recoveries to confirm that what you think got backed
up really did get backed up and that you can recover it.
Also, since you are doing mySQL, be sure you are taking into account the
peculiarities of backing up databases.
---------------
Chris Hoogendyk
-
O__ ---- Systems Administrator
c/ /'_ --- Biology & Geology Departments
(*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst
<hoogendyk AT bio.umass DOT edu>
---------------
Erdös 4
|