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

Re: non-interactive ftp



Christian said:
> hi,
> 
> i'm trying to write a backup script which is directly saving the
> valueable data to my ftp-backup space. i was going to use ncftpput, 
> because it lets me do this:
> 
> tar cvf - /home | ncftpput -u operator -c server /backups/monday.tar
> 
> so i can backup direct to my backup space without saving it to the local 
> disk (which is a good thing, as content grows...). but this way i also 
> have to rotate the backups on the backup space. 

but if you do it like above, won't you only have 7 days, and then it
starts overwriting? No need to rotate. I see a script doing something
like this:

#!/bin/bash

weekday=`date +'%a'`

tar cvf - /home | ncftpput -u operator -c server \
/backups/home_$weekday.tar

then in backups/ you'll have
home_Sun.tar
home_Mon.tar
etc...

and after 7 days it will just start overwriting so it will never grow
beyond a weeks worth.


-- 

phil


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: