Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] rdiff-backup


2009/6/4 jam <jam@xxxxxxxxx>:
> Wearing my "I wish somebody had said this, useful, sharing" cap and not my
> "dragons and swords" one I declare that, except for those interested in pages-
> n-pages of python stack traces or very simple systems, rdiff-backup is
> unmentionably awefull.

We are just starting to deploy Bacula after some examination.

The matter with backups is not just to make them - but also to manage
a catalog to help you find the right file when you have to restore
things.

> #! /bin/bash
> DAY=`date +%a`
>
> #### Cycle all the daily backups
> rm -fr /backup/tigger.etc.30
> rm -fr /backup/tigger.home.30
> rm -fr /backup/tigger.mail.30
> rm -fr /backup/tigger.root.30
> ...
> for (( i=29 ; i ; i-- ))
> do
>  let j=$i+1
>  if [ -d /backup/tigger.etc.$i ] && [-d /backup/tigger.etc.1 ]; then
>    mv /backup/tigger.etc.$i /backup/tigger.etc.$j
>  fi
>  if [ -d /backup/tigger.home.$i ] && [-d /backup/tigger.home.1 ]; then
>    mv /backup/tigger.home.$i /backup/tigger.home.$j
>  fi
>  if [ -d /backup/tigger.mail.$i ] && [-d /backup/tigger.mail.1 ]; then
>    mv /backup/tigger.mail.$i /backup/tigger.mail.$j
>  fi
>  if [ -d /backup/tigger.root.$i ] && [-d /backup/tigger.root.1 ]; then
>    mv /backup/tigger.root.$i /backup/tigger.root.$j
>  fi
> ...
> done

Consider looking at "savelog" or "logrotate". I'm not sure where
"savelog" popped up from but it appears to be a script-friendly
interface to one-off logrotates.

Cheers,

--Amos