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

Re: [Devel] Backup-project.



On Sun, Aug 31, 2003 at 05:46:11PM +0200, Herman Robak wrote:
> On Sun, 2003-08-31 at 08:40, Michael Bramer wrote:
> > Hello
> > 
> > This is my first mail to this list [1].
> > 
> > On Fri, Aug 29, 2003 at 02:02:56PM +0200, Herman Robak wrote:
> > > On Fri, 2003-08-29 at 12:39, Aigars Mahinovs wrote:
> ...
> > > > $ restore some_good_file.swx
> > > > Last backup of this file was done 2003-08-27 02:00:23.
> > 
> > I like this. What is the name of the debian package/URL?
> 
>  It is not made yet.  Morten Werner Olsen is proposing a
> backup system that he is going to develop this autumn,
> as his college semester project.  Aisgars Mahinovs just
> requested another feature.
> 
>  The spec draft is currently in Norwegian only:
> http://developer.skolelinux.no/info/studentgrupper/2003-backup/backup-kravspek.pdf

ok, maybe somebody can translate it...

only for the record:
 - I have a script, that backup all files in '.backup' dirs in the
   current directory. 

   With this the user can restore his files with normal file manager. 

   If he like to restore the file file:///home/joe/priv/math/first.doc,
   he go to file:///home/joe/priv/math/.backup/first.doc and get it...

   Maybe you get the idea:

  ! #!/bin/sh
  ! #
  ! # Save a copy of any file in 'pwd' that has been changed.
  ! 
  ! set -e
  ! 
  ! find -mtime -1 -type f | while read file 
  ! do
  !     case "$file" in
  !         *~) continue;;
  !         */CVS/*) continue;;
  !         */.backup/*) continue;;
  !     esac
  ! 
  !     # do nothing if file is empty
  !     test -s "$file" || continue
  ! 
  !     newfile=`echo "$file"|sed -e "s+\(.*\)/+\1/.backup/+"`
  ! 
  !     if [ -e "$newfile" ]; then
  !         cmp -s "$file" "$newfile" && continue
  !         savelog -c 10 "$newfile" >/dev/null
  !     else
  !         dir=`dirname "$newfile"`
  !         test -d "$dir" || mkdir -p "$dir"
  !     fi
  !     cp -a "$file" "$newfile"
  !     chmod a-w "$newfile"
  ! done

  (I use this script to make backups every hour in some dirs.)

  with something like:

  ! # find -path "*/.backup/*" -atime +1 -type f | while read file 
  ! # do
  ! #     rm $file
  ! # done

  you can remove old backup files.

  With this script you can catch >90% of all restore cases without any
  admin support.

 - Maybe 'faubackup' make something like this script and it can make
   remote backups also. 
   Maybe you should look at it. (apt-cache show faubackup)

Gruss
Grisu
-- 
Michael Bramer  -  a Debian Linux Developer      http://www.debsupport.de
PGP: finger grisu@xxxxxxxxxxxxx  -- Linux Sysadmin   -- Use Debian Linux
Linux - mehr Pinguin braucht kein Mensch

Attachment: pgp00048.pgp
Description: PGP signature