Re: Q's on dump(8) and restore(8)

From: Matthew Seaman (m.seaman_at_infracaninophile.co.uk)
Date: 09/13/03

  • Next message: exodus_at_resist.ca: "I need help getting a desktop working."
    Date: Sat, 13 Sep 2003 13:37:33 +0100
    To: Mark Terribile <materribile@yahoo.com>
    
    
    

    On Sat, Sep 13, 2003 at 12:00:11AM -0700, Mark Terribile wrote:

    > I'm looking to improve and automate my primitive
    > backups and I'm considering dump(8)/restore(8). But
    > before I go this route, I'd like to be sure I can
    > control their behavior. Unfortunately, the man pages
    > don't seem to completely describe the interaction
    > between the numerical dump flag in /etc/fstab and
    > the dump level. Can anyone elucidate?

    Dump levels are a flexible way of implementing incremental backups. A
    level 0 dump will always back up everything[*]. Then a level 1 dump
    backs up all of the files that have been modified since the last level
    0 dump, and a level 2 dump would backup every file that had been
    modified since the previous lower level (level 1 or level 0) dump, and
    so on, all the way down to a level 9 dump.

    Let's look at some common dump schemes. I'll base these around a
    weekly cycle, using a separate tape for each day of the week:
    generally what you'ld do is have several sets of these weekly tapes
    that you cycle through, so you aren't completely lost if one of those
    sets of tapes should be found to be substandard.

    People with more money (or backup media) than is good for them can
    just run a full backup every day:

      Sun Mon Tue Wed Thu Fri Sat

      0 0 0 0 0 0 0

    This maximizes the amount of data to back up each day, but also
    minimizes the amount of effort required to restore the system to the
    state at any particular date and it gives you minimum exposure should
    one of your tapes fail.

    The alternate extreme is:

      1 2 3 4 5 6 7

    So that except for Sunday, each day all you do is backup what changed
    since the previous day. It's assumed that your level 0 dump
    corresponds to the state of the system immediately after installation,
    and you may or may not actually perform a level 0 dump at that time.
    Prudence dictates that you should certainly run an occasional level 0
    dump to help keep the size of your level 1 tape sets down and just on
    general principles. This is parsimonious with the tapes, but if you
    need to restore the system to the state on Saturday, you need *all* of
    your weeks tapes. And if the Monday tape breaks, then the following
    Tuesday to Saturdays' tapes are pretty much useless.

    Probably the most popular scheme is:

      1 3 3 3 3 3 3

    So each day you back up everything that changed since the previous
    level 1 backup. (Or you could do a level 0 instead ot the level 1 each
    week for extra security). That means that the Friday or Saturday tapes
    get a lot more use than the Monday tape. However all you need to
    restore the system is the level 1 and the appropriate level 3 tape.

    > In the same vein, does anyone know the
    > `modified tower of Hanoi' algorithm the man page
    > recommends?

    If you don't know what "Towers of Hanoi" is, fire up your nearest copy
    of emacs and run:

        M-x hanoi

    or

        M-x hanoi-unix

    although that second one takes quite some time to run to completion.

    The 'modified Towers of Hanoi" backup sequence is based on that game.
    This is an optimised sequence that achieves a balance between the
    different extremes shown above. A weekly system would look like:

      1 3 2 5 4 7 6

    although the man page shows how to extend that for a few extra
    days. This results in approximately the same amount of data being
    saved on each daily tape, but doesn't require that all tapes are
    needed to do the Friday backup and should one of the daily tapes fail
    (other than a level 1 tape), you can still restore to the state only
    one day away. Thus:

           Tapes needed
      Sun: 1
      Mon: 1, 3
      Tue: 1, 2
      Wed: 1, 3, 5
      Thu: 1, 2, 4
      Fri: 1, 3, 5, 7
      Sat: 1, 2, 4, 6
      
    By the way, although I've shown all of these cycles based on a week
    starting on Sunday, I can tell you from practical experience that the
    full level one backup is most likely to need attention, so it's often
    a good idea to shift the cycle round so that the big weekly backup
    happens on a week day.

            Cheers,

            Matthew

    [*] Except when you use the '-h 0' flags to dump(8), which tells
    dump(8) to honour the 'nodump' file flag even at level 0. By default
    the 'nodump' flag is only honoured at level 1 or higher.

    -- 
    Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                          Savill Way
    PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
    Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
    
    


    • application/pgp-signature attachment: stored

  • Next message: exodus_at_resist.ca: "I need help getting a desktop working."

    Relevant Pages

    • Re: Backup advice
      ... methodology but the restore methodology. ... Some backup solutions will copy the files as separate files. ... Dump seems to be the best at doing what I'm looking to do. ... Try dropping one of those drives on a hard floor ...
      (freebsd-questions)
    • Secure backups with GPG: local SCSI tape with DUMP, two remote streaming backups using MKISOFS and T
      ... I have tested using GnuPG to encrypt and decrypt a filesystem backup using ... INTERACTIVE restore function always failed due to the way that UFSRESTORE ... Unix DUMP) and later decrypt and restore this encrypted backup. ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Hard Disk Backup Question
      ... I thought a auto backup routine would ... a compressed dump to a disk file. ... So you could restore an entire filesystem, ... # USAGE: dumpit LEVEL DUMPDEV DUMPID ...
      (Fedora)
    • Re: Looking for backup software of complete system
      ... > Could anyone recommend a backup software that would back up the whole ... I would recommend dump or cpio. ... You can then restore from tape with the command restore. ...
      (Fedora)
    • Re: Recommendations for home backup solution
      ... > backup if possible. ... Dump is a great command to dump file systems to just about ... To restore files, ...
      (Fedora)