LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
[stats]
From: shane <shane@scopenet.com.au>
To : David Drury <idavid@smug.adelaide.edu.au>
Linux SA <linuxsa@linuxsa.org.au>
Date: Tue, 19 Jun 2001 10:50:00 +0930
Re: Backup using FTP
This is what I do, I have modified the the following examples for security
reason it should be easy to follow
You will need php installed, I use php because I like it, it may not be the
best, however the following have been working for me on several servers
without any issues for serveral months now.
I add a bit of logging into the scripts, I'm sure you'll be able to work
that out for yourself.
script name: hdd-backup.sh
#!/bin/bash
tar -czf /backups/etc.tar.gz /etc 2> /dev/null
tar -czf /backups/var.tar.gz /var 2> /dev/null
tar -czf /backups/home.tar.gz /home 2> /dev/null
tar -czf /backups/root.tar.gz /root 2> /dev/null
php -q /root/scripts/ftp-backup.php
scipt name: ftp-backup.php
<?php
set_time_limit(0);
$ftp_conn1 = ftp_connect(ftp.server.com.);
ftp_login($ftp_conn1, "user", "password");
ftp_put($ftp_conn1,"linux-backups/etc.tar.gz","/backups/etc.tar.gz",FTP_BINA
RY);
ftp_put($ftp_conn1,"linux-backups/home.tar.gz","/backups/home.tar.gz",FTP_BI
NARY);
ftp_put($ftp_conn1,"linux-backups/root.tar.gz","/backups/root.tar.gz",FTP_BI
NARY);
ftp_put($ftp_conn1,"linux-backups/var.tar.gz","/backups/var.tar.gz",FTP_BINA
RY);
ftp_quit($ftp_conn1);
?>
Cheers
Shane Gelven
----- Original Message -----
From: "David Drury" <idavid@smug.adelaide.edu.au>
To: "Linux SA" <linuxsa@linuxsa.org.au>
Sent: Monday, June 18, 2001 6:50 PM
Subject: Backup using FTP
> 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
Index:
[thread]
[date]
[subject]
[author]
[stats]
Return to the LinuxSA Mailing List Information Page