Re: Backup Script
hi ya du
- when making backups... you'd probably want month/date as part of
your backups ( assuming bash backup script )
date '+%Y%m%d' --> 20021019
date '+%Y.%m.%d' --> 2002.10.19
- for tar stuff
-mtime -7 last 7 days
-mtime -30 last 30 days
- you probably want to remove some files from the backups
*.o *.c~ *.bak ....
.netscape/cache or .mozilla/*/*/Cache
find /root /home /etc -mtime -7 | egrep -iv "\*.o|\*.c~|\*.bak"
| tar zcvf /mnt/Backup/`date '+%Y.%m.%d'`.tgz -T -
make that a script if you like
- dont forget to make the backup file root-readable only
- encrypt the backup file if you're paranoid
- you probabably wanna run your daily backups automatically from cron
crontab -e
#
# Daily 12:05am == Daily Incremental Backups w/ counter since lastfull backup
5 00 * * * /usr/local/scripts/Backup.pl -skipWeb
#
# Sat at 1:01am == Weekly 30-day Incremental Backups
1 01 * * 6 /usr/local/scripts/Backup.pl -skipWeb -inc32
#
# Sun at 2:01am == Weekly Full Backups
1 02 * * 0 /usr/local/scripts/Backup.pl -skipWeb -full
#
#
# you should do a 90 day incremental backup too
#
1 03 * * 0 /usr/local/scripts/Backup.pl -skipWeb -dayz 95
#
- and if the backup disks/partition was full for the past 2 days..
and crashed the disk ... can you recover all your data ???
for lots of various backup scripts
http://www.Linux-Backup.net/app.gwif.html
c ya
alvin
On Sat, 19 Oct 2002, Debian User wrote:
> Would anyone happen to know of a ready made backup (tar) script for a
> debian box, something that I could tell to backup to another drive, and
> make full copies with incremental updates throughout the week. Would be
> nice to have it report to a file too. I have messed around with using
> tar, but don't know enough to make a nice backup script yet, maybe
> someone already has one made up they could hand out. Don't want an
> excessive script, just something that gets to the point.
>
> Thanks a bunch
>
> du
Reply to: