Re: script to delete and replace files

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

 



Ignacio,

This is probably not the way you want to do backups. Removing and
writing 30Gb daily is hardly a good practice from any standpoint,
especially. I am sure your ftpuser directory doesnt get changed a
whole lot over night. So there is little sense in deleting/writing
essentially the same data nightly.

I suggest that you:
1. Take the time to sit down and read a little on backup strategies. 
2. Take a look at rsync. This is probably the best solution for your
situation. [Which is quite common, might I add.]

Kind Regards,
Greg

On 9/7/05, Ignacio Gómez <igomezu@xxxxxxxxx> wrote:
> i´m writing a script to backup some files, the idea is to backup the file
> adding the date. I will copy the file tgz to another folder. This is a daily
> backup and it is so large. So I need the new one file tgz replace the oldest
> in the folder comparing the date how to do that?
> 
> i did something like that :
> 
> fecha=`date +"%y%m%d"`
> 
> 1)
> time tar -czvf /var/BACKUP/ftpuser.$fecha.tgz /home/ftpuser so the result is
> ftpuser060905.tgz (size 30gb) so next day I need the new file tgz
> ftpuser070905.tgz replaces the previous one i mean, delete the previous one
> and put the new one. How to do that?, sorry i'm not good at programing
> 
> 
> thanks
> 
> Ignacio Gómez
> Bogotá Colombia
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subjectunsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux