Re: [CentOS] backup script

2011-03-20 Thread Pinter Tibor
On 03/20/2011 08:31 AM, madu...@gmail.com wrote: > 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 man lftp t __

Re: [CentOS] backup script

2011-03-20 Thread madu...@gmail.com
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, wrote: > madu...@gmail.com wrote: >> Should I add to

Re: [CentOS] backup script

2011-01-28 Thread Nico Kadel-Garcia
On Fri, Jan 28, 2011 at 1:03 PM, madu...@gmail.com wrote: > home folder for backup  /backup This is a tactical problem. If you actually read the "File System Hierarchy" guidelines, you'll see that it should be in "/var" as dynamic, volatile content, probably undar "/var/backup". If that backup r

Re: [CentOS] backup script

2011-01-28 Thread Brunner, Brian T.
> -Original Message- > From: centos-boun...@centos.org > [mailto:centos-boun...@centos.org] On Behalf Of m.r...@5-cent.us > Sent: Friday, January 28, 2011 1:07 PM > To: CentOS mailing list > Subject: Re: [CentOS] backup script > > madu...@gmail.com wrote: &g

Re: [CentOS] backup script

2011-01-28 Thread m . roth
madu...@gmail.com wrote: > home folder for backup /backup > > On Fri, Jan 28, 2011 at 7:49 PM, wrote: >> madu...@gmail.com wrote: >>> I have reallocated it to /home >>> thx >> Please stop top posting. >> >> Relocated it to /home, as in /home/backup? Don't clutter your base >> directories, that's

Re: [CentOS] backup script

2011-01-28 Thread madu...@gmail.com
home folder for backup /backup On Fri, Jan 28, 2011 at 7:49 PM, wrote: > madu...@gmail.com wrote: >> I have reallocated it to /home >> thx > Please stop top posting. > > Relocated it to /home, as in /home/backup? Don't clutter your base > directories, that's very bad practice. > >       mark >

Re: [CentOS] backup script

2011-01-28 Thread m . roth
madu...@gmail.com wrote: > I have reallocated it to /home > thx Please stop top posting. Relocated it to /home, as in /home/backup? Don't clutter your base directories, that's very bad practice. mark ___ CentOS mailing list CentOS@centos.org htt

Re: [CentOS] backup script

2011-01-28 Thread Keith Roberts
On Fri, 28 Jan 2011, madu...@gmail.com wrote: To: CentOS mailing list From: "madu...@gmail.com" Subject: Re: [CentOS] backup script I have reallocated it to /home thx On Fri, Jan 28, 2011 at 5:33 PM, wrote: madu...@gmail.com wrote: Should I add to my tar the following

Re: [CentOS] backup script

2011-01-28 Thread madu...@gmail.com
I have reallocated it to /home thx On Fri, Jan 28, 2011 at 5:33 PM, wrote: > madu...@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

Re: [CentOS] backup script

2011-01-28 Thread cpolish
madu...@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 wrote: > > From: "madu...@gmail.com" > > > >> I want to create bas

Re: [CentOS] backup script

2011-01-28 Thread madu...@gmail.com
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 wrote: > From: "madu...@gmail.com" > >> I want to create bash script to have a zip copy from a website runn

Re: [CentOS] backup script

2011-01-25 Thread John Doe
From: "madu...@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

Re: [CentOS] backup script

2011-01-25 Thread Cameron Kerr
On 25/01/11 21:56, madu...@gmail.com wrote: > Am thinking to have this in my script > > #!/bin/bash > tar -cvzf /tmp/website-$(date +%Y%m%d-%H%M).tgz /var/www/htdocs/* > find /tmp/website/website*.tgz -ctime +5 -exec rm {} \; # removes > older then 5 days That should do in your case. Though, in

Re: [CentOS] backup script

2011-01-25 Thread madu...@gmail.com
Am thinking to have this in my script #!/bin/bash tar -cvzf /tmp/website-$(date +%Y%m%d-%H%M).tgz /var/www/htdocs/* find /tmp/website/website*.tgz -ctime +5 -exec rm {} \; # removes older then 5 days crontab it 30 6 * * * /mypath/myscript On Tue, Jan 25, 2011 at 10:45 AM, Nelson wrote: > You

Re: [CentOS] backup script

2011-01-25 Thread Nelson
You could create a script and have a variable date --date="5 days ago" append to your tar file and after that, combine it with if syntax. If match, then rm. HTH On Tue, Jan 25, 2011 at 3:31 PM, madu...@gmail.com wrote: > I want to create bash script to have a zip copy from a website running >

Re: [CentOS] backup script

2011-01-25 Thread Edo
Hi, Try the ff: On 1/25/11 4:31 PM, madu...@gmail.com wrote: > 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/w

[CentOS] backup script

2011-01-24 Thread madu...@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 creat