Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Simple Backup


With the philosophy of keeping it simple, one approach is to simply use find and tar to find all changes since your last backup and put them into a compressed tar file. You can do daily, 7 day, or 32 day incremental backups, with a full backup weekly, monthly, or quarterly. You can create a script, perhaps called do-backup.sh in /root, as root:



  #!/bin/bash
  DATE=$(date +%Y-%m-%d-%R | tr -d ':')
  DAYS=32
  
  cd / 
  find home etc usr/local -type f -mtime -${DAYS} \
  | egrep -iv '(.bak|.mp3|cache|trash|~$)' \
  | tar zcvf /root/backup-${DATE}-last-${DAYS}.tgz -T -

You can use cron to perform the daily, weekly, or monthly incremental backups. Refer to https://www.linux-backup.net/scripts/Backup.pland https://www.Linux-Backup.net/App for further information.

Note that tar can handle incremental backups with the -g (and -M, for multiple tapes) options.


Copyright © 1995-2006 [email protected]

 
 
  Published under the terms fo the GNU General Public License Design by Interspire