cron is a timing app for unix. man cron will tell you how to set it up, sorry
but I'm kinda swamped. But basically you can set it up to run commands at
certain intervals.

tar originated as a tape archiving system and basically you use it before gzip
to bundle everything together.

rsync is a remote syncing app. It looks at the remote file and the local file
and syncs the local to the remote. The good thing is that it only transfers the
differences. Saves a lot of bandwidth.

The simplest way to put this all together for starters, in my opinion, would be
to use:

crontab -e

to open crontab, then add:

00 * * * *  tar -c  <your_file>  >  <tar_file> && gzip <tar_file> && rsync -rv
-t domain.com:/path/to/tar_file  /local/backup/file

That tells it to tar the file, gzip the file, then sync it to your local
machine (or machine #2).

More better?

John

E K L wrote:

> Ok, thanks for ur suggestion...But, can u explain in more detail on how
> those command works? thanks....
>
> >From: John Starkey <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: E K L <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: Re: [PHP-DB] Back up database.....
> >Date: Mon, 09 Apr 2001 21:39:32 -0600
> >
> >I'm on Linux and Unix and I just run a cron job each night to tar and gzip
> >the datadirs. Then I use rsync tunneled thru ssh to sync the remote and
> >local
> >files.
> >
> >I couldn't tell you how to do it one Windoze though.
> >
> >Hope this helps.
> >
> >E K L wrote:
> >
> > > Hi all,
> > >
> > >    I'm having this problem in backuping my database which is in Mysql
> >from
> > > one server to another server. The servers are in different location and
> > > having different ip address. So, can any one come to me and consult?
> > > Your help is much appreciate, thank you....
> > >
> > > E K
> > >
> >_________________________________________________________________________
> > > Get Your Private, Free E-mail from MSN Hotmail at
> >http://www.hotmail.com.
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to