Re: Confused by Amanda
On Sunday 02 September 2018 06:27:01 Dan Ritter wrote:
> On Sun, Sep 02, 2018 at 04:09:22PM +0900, Mark Fletcher wrote:
> > I recently messed up some files and decided to resort to the backup
> > to recover them. I was able to do so, but the process left me
> > wondering if I would really be in a position to do so in all cases.
> > For example, Amanda configuration is in /etc/amanda -- what if /etc
> > was what I needed to restore? Similarly, I gather there are files
> > under /var/lib/amanda -- what happens if /var is damaged?
> > I have not been able to understand from the Amanda documentation
> > really all that I need to have in place to be able to expect to
> > recover from, say, a disk replacement after catastrophic failure.
> > I'm imagining, main disk goes to data heaven, I buy a new one,
> > install Stretch again fresh, and now I want to re-install packages
> > and restore their backed-up configuration as well as restore my data
> > in /home etc. I know there are a few experienced users of Amanda on
> > this list -- can anyone help me, or perhaps point me to a good
> > resource that explains it, or even if there's a section in the
> > documentation I've missed that makes it clear?
> > I guess a key point is, in my configuration, the same machine is
> > both Amanda server and Amanda client. I guess I may expand this in
> > the future to have this machine manage backups for other machines,
> > but at the moment that is not happening. Of course, the disk that
> > houses the Amanda virtual tapes is off-machine.
> > What I'm looking for is along the lines of "your nightly backup
> > routine needs to be run amdump, then rsync this, this and this
> > directory somewhere safe" or whatever it is. Or alternatively "don't
> > be an idiot you don't need to do any of that, amanda is magic in
> > this, this and this way".
> Amanda is not good for the situation you describe.
No its not ideal in some cases,, which is why I wrote a wrapper script
for the make a backup portions of amanda. With the resources and configs
that existed at the time that backup was made actually appended to the
end of the vtape, pretty much an empty drive recovery is possible. It
appends the /usr/local/etc/amana/$config,
and /usr/local/var/amanda/record_of_backups to each vtape it makes. So
those 2 files can be recovered with tar and gzip, put back on a freshly
installed linux of your favorite flavor, and a restore made that will be
a duplicate of what your had last night when backup.sh was ran.
Like all such scripts, its subject to being modified the instant it's
been published, and likely as not, won't fit your situation. But the
outline is there, and fairly well commented, and should serve as a
guildline to customize it for your own use. Look on my web site if
interested, and can hack this old copy to do this for you, see my
website in the sig, adding Genes-os9-stf to the path, and its the 1st
two files at the top of the list. I am currently backing up this machine
and 4 of my cnc machines in the garage and an outbuilding with todays
version of it. To vtapes on a separate 2T drive. All in one session
every night in the wee hours.
> Amanda expects that the server is doing backups for a number of
> clients, and that the server itself is backed up from either
> a different Amanda server or via a different method.
> If you say what your actual configuration is, we can recommend
> more appropriate systems. For example:
> Let's say you have a standalone system with a 4TB hard disk for
> /home and a 250GB SSD which is root and /var. Right now df -h
> says you have used 27GB in /, 8GB in /var, and 1.2TB in /home.
> You don't expect a single massive data usage change, so much as
> slow growth over the course of the next few years.
> In that scenario, I would first suggest buying a 3-5TB disk and
> putting it in an external case - eSATA is excellent, USB3 is pretty
> good. Mount it as /backup and use rsnapshot to make ongoing
> backups via the standard cron job it will set up. An rsnapshot
> backup is entirely filesystem-visible, so when you try to
> recover a few files (because you accidentally deleted or
> overwrote them) you can just copy them back in to place; when
> you need to restore to new disks, you can install a minimal
> system then copy over on top of it.
> Tell us your scenario, and we can offer better advice.
Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>