[Wylug-help] Scriptable FTP, creating remote archives
Christopher McLean
C.J.McLean at leeds.ac.uk
Fri Dec 2 11:31:06 UTC 2011
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 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 :)
Chris
| -----Original Message-----
| From: wylug-help-bounces at wylug.org.uk [mailto:wylug-help-
| bounces at wylug.org.uk] On Behalf Of James Holden
| Sent: 02 December 2011 11:25
| To: wylug-help at wylug.org.uk
| Subject: [Wylug-help] Scriptable FTP, creating remote archives
|
| All,
|
| I've just moved a DB-based app of mine to a new dedicated server and I
| got 100GB of FTP backup space as part of the deal.
|
| The backup plan is to:
|
| 1) Flush and lock the DB tables
| 2) Create an LVM snapshot (instantaneously)
| 3) Unlock the DB, allowing the app to continue running
| 4) Create an FTP archive of the current state
|
| For a variety of reasons, it'd be preferable to create an tar archive
| on the remote box, but I can't figure out how to do it non-
| interactively.
|
| The ancient command line FTP client can do it as follows:
|
| > put |"tar czf - somedir" archive.tgz
|
| ...but my usual choice for scriped FTP, lftp, doesn't understand this.
|
| Anyone got any ideas?
|
| Cheers,
|
| James
|
| --
| James Holden Developer, SEO, Technology Consultant
| http://jamesholden.net/ Leeds, United Kingdom
| http://twitter.com/jamesholden 07989 702968
| PGP key fingerprint: 32C9 A76F 3CFE A06C 1B00 5AAB 9877 4742 8358 863A
More information about the Wylug-help
mailing list