[OpenAFS] Backup methods
Sergio Gelato
Sergio.Gelato@astro.su.se
Fri, 30 Mar 2007 19:34:24 +0200
* Gert Burger [2007-03-30 13:52:58 +0200]:
> Brian Sebby wrote:
> >The main issue in backing up AFS is that you need to preserve the ACLs that
> >are stored in the directory structure - if you just back it up as files
> >you're going to lose that.
[...]
> >What we do (and I suspect many others) is to use the command 'vos dump' to
> >dump each volume to a disk file that contains the ACL information. The
> >downside to this is that you don't have file backups from AFS - just volume
> >backups. To get the names of the volumes to dump, I use the 'vos
> >backupsys'
> >command to create .backup volumes of all of my volumes at a certain time of
> >day (usually 4am), and then have a script parse the output of the
> >'vos listvol' command to find all the backup volumes and back those up.
[...]
> My problem with dumping a volume and doing a backup of that is that it
> seems difficult to do incrementals.
"vos dump" does support incrementals. As a matter of fact, I do mostly
incrementals. An incremental dump consists of a full dump of the
directory vnodes (so you have all the latest ACLs and directory
listings) plus the contents of any files modified after the starting
time you specify for the incremental.
> We only have enough space for about 3x the amount of data we on our
> backup server and we dont use tapes at all.
[Aside: I'd question the wisdom of not using tapes as a second stage.
Backup servers are about as likely to suffer disk failures as anything
else.]
Incremental 'vos dump's aren't that different from the file-level backups
you might do with other systems (e.g., rsync with the --link-dest option).
A common limitation is that they do not deal well with frequent small
changes to large files; if your users do a lot of those, you'll want to
apply some xdelta-like compression tricks to your backups. (Are you
doing something like this already?)
One thing one could do is post-process the dump files from vos, keeping
the dump header and the directory vnodes but splitting off the file
vnodes to individual files on the backup host's filesystem, and
compressing previous generations of a given file with xdelta. The
format of the dump files is relatively easy to parse, and there are
tools to do that. Have a look in /afs/grand.central.org/software/dumpscan/.
Whether this is worth the trouble depends on your usage patterns (and
on your budget: it may be simpler to increase your storage capacity).
> Therefore we need to
> optimize our disk space usage so that we can keep daily incrementals for
> up to a month(We do a full backup monthly).
>
> Currently I am considering just to backup the files and lose the ACL's,
> seeing as we wont have complicated ACLs in anycase.
That's usually up to the users. Make assumptions at your own risk.