[Wylug-help] Scriptable FTP, creating remote archives

John Hodrien J.H.Hodrien at leeds.ac.uk
Fri Dec 2 12:23:13 UTC 2011


On Fri, 2 Dec 2011, Christopher McLean wrote:

> Key based ssh, with tar output pumped over the connection? something like;
>
> tar -czfv - <LVM SNAPSHOT> | ssh root at dumpserver.nixcraft.in "cat >
> /backup/<LVM SNAPSHOT>.tar.gz"
>
> if you are up for it, you could most likely pump the lvm snapshot output
> directly to tar and never have data hit your local filesystem.

I'd have suggested something very similar.  dump/restore is another option,
but probably doesn't have any real benefits over tar as long as you have a
newish tar that understand acls/xattrs/selinux contexts sufficiently for your
needs.

I also doubt you really want root at dumpserver and instead want
backup at dumpserver.  A cron job or similar on your backup server can also take
these backups out of the clutches of the backup user so it can't
overwrite/delete them.

The problem you've got is that this assumes ssh access to the other end, which
I'm reading it as though we don't have.

Perhaps:

tar cz /path/to/snapshot | lftp -c put /dev/stdin \
         -o backup.tar.gz -u user,pass dumpserver.nixcraft.in

Twiddle it to taste.

> I hate backups and as a rule of thumb remain paranoid about them, so general
> caveats of YMMV/not my fault/I didn't do anything apply to the above :)

I'm 100% with you on that one.  Backups are always best being done by other
people.

jh



More information about the Wylug-help mailing list