Re: backup

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

 



For a free backup system tar is pretty hard to beat!

The following script handles my hourly backup of my MySql.  
It performs the following steps:
1) Deletes the previous backup(s)
2) Tars and compresses contents of /var/lib/mysql
3) Copies (via Samba) the resulting tar 
   (For example NS13-hourly-backup-16-June-2004-09.tar.gz)to a Windows XP box 
  (Burner) share (bup).

rm -f /backups/NS13-hourly-backup*.tar.gz
tar -czpf /backups/NS13-hourly-backup-`date '+%d-%B-%Y-%H'`.tar.gz  \
    --directory /var/lib/mysql .
cd /backups
smbclient //Burner/bup -N -c 'prompt off;mput mask NS13-hourly-backup*'

The following script similarly handles my daily full (tmp, mnt, proc, work, 
backups, and sys directories are excluded.

rm -f /backups/NS13-full-backup*.tar.gz
tar -czpf /backups/NS13-full-backup-`date '+%d-%B-%Y'`.tar.gz  \
    --directory / --exclude=tmp --exclude=mnt --exclude=proc --exclude=work 
  --exclude=backups --exclude=sys .
cd /backups
smbclient //Burner/bup -N -c 'prompt off;mput mask NS13-full-backup*'

Simply plop the scripts in /etc/cron.hourly and /etc/cron.daily, respectively 
and you're done. 

------------------------------


  a.. From: Vano Beridze <vano beridze silkroad ge> 
  b.. To: "fedora-list redhat com" <fedora-list redhat com> 
  c.. Subject: backup 
  d.. Date: Wed, 16 Jun 2004 16:32:43 +0500 

--------------------------------------------------------------------------------
Hello


I have a PC at work and I want to backup data on  a regular basis.
Could you please point to some reading materials on how to do that?
I want a simple backup of some files, to some file I think would be enough.


Thank you
Vano Beridze



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux