[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] backups (again!)



matt fairtlough <matt [at] fairtlough.net> writes:

> Q2: is there any way to do a network backup via ftp or telnet (yes, I
> know I should use ssh.  As far as I can tell, the university gateway
> does not support it, and I need to pass through it) that involves
> creating compressed tar files on-the-fly?   And preferably automated...
>
> I know ftp has a limited amount of support for handling pipes, but it
> seems I can't pipe the output of
> tar -c <directory> into it; also I do not know if telnet supports file
> transfers [well, I can ftp via telnet, but that doesn't seem any more
> useful than ftp itself]
>
> thanks in advance for any pointers,

create a .netrc file for the user doing backups (root?) this should
look something like:

machine some.machine.shef.ac.uk
login someusername
password somepassword

then create a file with the following FTP commands:

open some.machine.shef.ac.uk
put "|tar czf - /dir/to/backup/ /another/dir/ ..." filename.tar.gz
bye

then, just pipe the second file to ftp, and it will open a connection,
log in, fork off a process to do the tar, upload it under the name
filename.tar.gz, and disconnect.

for more details, see the ftp man page (esp. "file naming
conventions") and the netrc manpage.  

  -Eric
___________________________________________________________________

Sheffield Linux User's Group - http://www.sheflug.co.uk . 
To unsubscribe from this list send mail to 
shef-lug-request@list.sheflug.org.uk with the word
"unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.