Daily backups

Magnus Runesson mr-ubuntu at linuxalert.org
Sat Dec 3 16:46:54 UTC 2005


On Sat, 2005-12-03 at 10:55 -0500, Kim Briggs wrote:
> On 12/2/05, Phillip Susi <psusi at cfl.rr.com> wrote:
> > I'm trying to figure out how to set up a system to perform automated
> > daily incremental and weekly full backups.  So far I have no problem
> > using tar for a weekly full backup, but now I'm trying to get it to
> > perform daily incremental backups.  I found the --newer-mtime option
> > that looks like it should do the trick for daily backups, but I have a
> > few small issues still left to work out:
> >
> > 1) tar gets very noisy with --newer-mtime; it spits out a line for every
> > file that it does NOT backup because it's too old
> >
> > 2) tar seems to include all directories in the archive, regardless of
> > their mtime.  This doesn't really hurt anything I suppose, but it seems
> > wasteful.
> >
> > 3) I need a way to generate a date string automatically for yesterday.
> > Something like `date --yesterday`.
> >
> >
> > Does anyone have any ideas?
> >
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
> Hello,
> 
> I agree with the first reply.  You should try rsync.  I have very
> basic needs, but life has been real good since I started using a
> fileserver and rsync to backup my files.  You sound like you have more
> sophisticated requirements, but here are my notes I made for a friend
> of mine to get started.
> 
> http://kimbriggs.com/computers/computer-notes/linux-notes/rsync-ssh-notes.html
> 
> Hope it helps,
> --
> http://kimbriggs.com


I use the rdiff-backup tool and a cronscript that looks as follows:
# Remove old
/usr/bin/rdiff-backup --force --remove-older-than 1M /srv/backup/rdiff/

# Do rdiff-backup
/usr/bin/rdiff-backup
--exclude-globbing-filelist /opt/local/etc/rdiff-backup.exclude / /srv/backup/rdiff/


This keeps all backups for one month and backups everything acording to
the rules listed in /opt/local/etc/rdiff-backup.exclude

Which looks like:
- **/lost+found
- **/cache
- **/Cache
- **/tmp
- **~
- **.o
- **/#*
- **/.xvpics
- **/.thumbnails
- **/thumbnails
- **/.nfs*
- **/.gnome-smproxy*
- **/.ee/minis/
- **/.sawfish/sessions
- **/.metacity/sessions
- **/.nautilus/thumbnails
- **/.jpi_cache
- **/mysql.sock
- **/.journal
- **/.pwd.lock
- **.rpmnew
- **.rpmsave
- **/.cddb
- **/epiphany/favicon_cache
- **/.galeon/favicons
- **/.kde/share
- **/.kde2/share
- **/proc
+ /etc
+ /home
+ /opt/local
+ /tftpboot
+ /var/lib/squirrelmail
+ /var/log/rpmpkgs
+ /var/lib/mailman
+ /var/named
+ /var/spool/mail
+ /var/spool/imap
+ /root
- **

The destination catalog is of course another disk than the rest of the
system.

Br,
/Magnus 
-- 
Magnus Runesson <mr-ubuntu at linuxalert.org>
Linuxalert





More information about the ubuntu-users mailing list