[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Raq4r Backup
- Subject: Re: [cobalt-users] Raq4r Backup
- From: "Carrie Bartkowiak" <ravencarrie@xxxxxxxx>
- Date: Sat Feb 24 23:50:13 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> > I would like to back up all information and files for each virtual site
on
> > our Raq4r.
I wrote this little script that will tar up everything in /home/sites and
drop it in an anonymous ftp directory called 'outgoing'.
You can then have another machine pick it up with its own cron job or just
leave it there as a backup.
If you want to change what you're backing up or where you'd like it dropped,
just make the appropriate changes:
#!/usr/bin/perl
$dir="/home";
$outgoing="/home/sites/home/ftp/outgoing";
$name="home.tar";
my $messages;
chdir $dir or die "Couldn't change directory.";
$messages.=`tar -cvf home.tar sites`;
$messages.=`mv home.tar $outgoing/$name`;
chdir $outgoing or die "Couldn't change to outgoing.";
$messages .= `chown httpd $name $outgoing`;
chmod 777, qq($outgoing/home.tar);
exit 0;
Name it 'backup.pl' and drop it into whatever cron folder you want (for
weekly, cron.weekly; for daily, cron.daily). Chmod it to 755 and chown it to
root.
CarrieB