Recall.. I run now the following task every day tar -cvzf /rescue/website-$(date +%u).tgz /var/www/htdocs/* I want now to move these files from the local server to a remote server via ftp. any help. Thanks On Fri, Jan 28, 2011 at 5:33 PM, <cpolish at surewest.net> wrote: > madunix at gmail.com wrote: >> Should I add to my tar the following option >> -p, --preserve-permissions >> extract all protection information >> tar -cvzfp ...... >> >> Thanks >> >> On Tue, Jan 25, 2011 at 7:10 PM, John Doe <jdmls at yahoo.com> wrote: >> > From: "madunix at gmail.com" <madunix at gmail.com> >> > >> >> I want to create bash script to have a zip copy from a website running >> >> on linux /var/www/htdocs/* local on the same box on different >> >> directory >> >> I am thinking to do a local backup using crontab (snapshot my web) >> >> tar -cvzf /tmp/website-$(date +%Y%m%d-%H%M).tgz /var/www/htdocs/* >> >> This command will create a file /tmp/website-20110101-1459.tgz >> >> I want it run on daily basis and to keep the last 5days backup on the >> >> box and remove older version than 5days. >> > >> > A quick way to do it is to use the day of the week: >> > website-$(date +%u).tgz >> > It will automaticaly keep the last 7 days... >> > Otherwise, you will have to use date calculations... > > I hope I'm not duplicating something someone has already said -- > /tmp may not be the best possible choice for backups. A reboot > could potentially "help" by cleansing that directory. Off-host > copies (eg, scp website-20110101-1459.tgz fred at otherhost:/home/fred/backups/) > would address a number of risks. > -- > Charles Polisher > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos