> Hi,
>
> Can somebody advise if they're aware of a program and/or series of script
> files that would help a struggling sysadmin control there intranet ftp
> server. Something that will say once every twenty-four hours triggered by
a
> crontab entry shift things out of an incoming directory and based on some
> rules/configuration parameters put it somewhere else or even compress it
for
> back-up.
>
> thanks, TIA
> Andrew
Could you make your own script? For example
#!/bin/sh
day=`date +%d`
month=`date +%m`
year=`date +%y`
name="$month.$day.$year"
backup_dir="/u1/backup"
ftp_dir="/home/ftp/incoming"
tar cvf $backup_dir/$name.tar $ftp_dir/*
gzip $backup_dir/$name.tar
rm -rf $ftp_dir/*
exit
I haven't tested this, but there might be some sytnax errors, but shouldn't
be anything to major. This will only work with gnu date (ships with most
(if not all) Linux distro's by default). Just run something like that out
of cron, it will tar everything up and put it in the backup_dir then
compress it, then delete all the new incoming files.
Warning, this is an untested script, and it will delete all the files even
if the backup fails. For example, if the backup_dir is full and can't
create a tar arch there, it will still delete all the files from the
incoming directory, which is a bad thing. You could do some checking here,
but this is just a quick example. USE AT YOUR OWN RISK.
Jack
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs