LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Mark Brown <mark@complex.psych.adelaide.edu.au>
  To  : Mark Phillips <mark@austrics.com.au>
  Date: Tue, 19 Jun 2001 11:17:40 +0930 (CST)

Re: Backup using FTP

> I'm not sure I can help you with piping into ftp but as far as scripting
> something...
> 
> I have found "lftp" to be a rather good ftp program.  Interactively it is
> great, and
> according to the man page you can script via "lftp -c <command>".  So, I
> suspect what
> you would write would be:
> 
> tar czf ~/tmp/tmpbackup.tar.gz <files>
> lftp -c "put ~tmp/tmpbackup.tar.gz" -u <user>,<password> <server>
> rm ~/tmp/tmpbackup.tar.gz
> Actually, I've just tried it and that middle line doesn't work for some
> reason, it
> comes back with a prompt.  Anyone know how this can be fixed?


The middle line should be something like

lftp -e "put ~tmp/tmpbackup.tar.gz ; exit" -u <user>,<password> <server>

if you really want to avoid a local file

mkfifo ~/tmp/tmpbackup.tar.gz
tar czf - <files> > ~/tmp/tmpbackup.tar.gz &
lftp -e "put ~tmp/tmpbackup.tar.gz ; exit" -u <user>,<password> <server>

should work


> 
> Cheers,
> 
> Mark.
> 
> David Drury wrote:
> 
> > Hey there, I was wondering what script options I have for backing up via
> > FTP.
> >
> > I have a linux box needing backup and a netware server with the backup
> > device in it (running unix services).
> >
> > I'd like to do something like
> >
> > tar czf - <files> | ftp server backupfile.tar.gz
> >
> > But can't find anything in the man pages about this. I know NCFTP has a
> > config file that'll store usernames and passwords which will be usefull,
> > but there is still the problem of piping.
> >
> > If this can't be done. Can someone make alternae suggestions for file
> > transfer that don't involve mounting the netware volumes, or putting the
> > backup device in the linux box. Neither of which are options.
> >
> > cya
> >
> > --
> > David Drury
> >    _______________________________________
> >    \ ua914299@teaching.cs.adelaide.edu.au \
> >     \    idavid@smug.adelaide.edu.au       \                __________ |
> >      \     Adelaide University Union        \        / \___-=O`/|O`/___|
> >       \        IT Co-ordinator.              \_______\        / | /     )
> >       /    Student Machine User Group        /      `/-==__ _/__|/__=--|
> >      /       Systems Administrator.         /         *      \  |      |
> >     /   "Cogito cogito ergo cogito sum."   /                  (o)
> >    /______________________________________/
> >
> > --
> > LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
> > To unsubscribe from the LinuxSA list:
> >   mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
> 
> -- 
> LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
> To unsubscribe from the LinuxSA list:
>   mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
> 


-- 
Mark.

   _-_|\    Mark Brown
  /     \   Psychology Dept
  \_.-*_/   University of Adelaide
       v    South Australia, 5005
            Phone:  +61 8 303 3181
            Fax:    +61 8 303 3770

-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page