Re: backup strategies

From: Eric Schuele (e.schuele_at_computer.org)
Date: 10/31/05

  • Next message: Csaba Henk: "Re: backup strategies"
    Date: Mon, 31 Oct 2005 09:40:16 -0600
    To: Csaba Henk <cs@creo.hu>
    
    

    Csaba Henk wrote:
    > Thanks for all the tips and answers, I will consider the mentioned
    > alternatives.
    >
    > Yet I have one more question...
    >
    > On Sun, Oct 30, 2005 at 01:22:35PM -0600, Eric Schuele wrote:
    >
    >>dump(8) will create a snapshot of a live filesystem, dump the snapshot
    >>and then remove the snapshot, if given the correct flags ('-L').
    >
    >
    > Can even a full bakcup done safely on a live filesystem by "dump -L"?
    >
    > As dump(8) says when explaining the -L flag:
    >
    > To obtain a consistent dump image, dump takes a snapshot of the file
    > system in the .snap directory in the root of the file system being
    > dumped and then does a dump of the snapshot.
    >
    > I don't see how the temporary snapshot can improve the
    > reliability/consistency/correctness of the dump. Could someone explain
    > this?
    >

    How do snapshots work and how do they provide the consistency necessary
    for a dump?

    (Well, I'm probably not the best one to answer this, but I'll take a swing.)

    Basically, when taking a snapshot... any new activity on the filesystem
    in question is suspended. All presently executing syscalls are allowed
    to finish. The filesystem is synchronized as if unmounting, and then a
    snapshot file is created. At this point filesystem activity is resumed.

    The real magic is in the snapshot file. The file is a snapshot of the
    filesystem metadata at the time the snapshot was taken. From this point
    on... as long as the snapshot exists on your machine... it tracks the
    changes that occur within the filesystem from the time you took the
    snapshot to the present. What this means is the snapshot file holds
    pointers to the data on your filesystem. As that data changes (since
    the snapshot), the old data gets claimed by the snapshot... and the new
    data is written to disk. Same with deleting data... the deleted data
    gets claimed by the snapshot and the filesystem looses it. Any
    unchanged data is simply referred to (in the snapshot file) as pointers
    to the existing data on the actual filesystem, and any new data need not
    be mentioned in the snapshot file.

    So the snapshot can be taken very quickly... and requires a bit of
    maintenance by the OS during its lifetime. But if you create it, dump
    it and remove it. The OS need not worry about it for long.

    SoftUpdates are required on the filesystem.

    HTH.

    -- 
    Regards,
    Eric
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Csaba Henk: "Re: backup strategies"

    Relevant Pages

    • Re: Backups / Dump etc
      ... dump which will automatically snapshot the mounted filesystems. ... so that the filesystem meta ... Let us posit that the dump kicks off just as you are writing the ... applications were quiesced at the time of the snapshot. ...
      (freebsd-questions)
    • dump woes
      ... dumping a snapshot to a file within the filesystem being dumped like so: ... The filesystem was only 4.1GB, ... dump file was growing to almost 12GB! ...
      (freebsd-stable)
    • Re: Backups / Dump etc
      ... > J> dump which will automatically snapshot the mounted filesystems. ... > since I'm not hurting on disk space, but I do wonder how much space it ... view of the filesystem at a particular point in time. ...
      (freebsd-questions)
    • Re: System deadlock when using mksnap_ffs
      ... It only happens on this one filesystem, though, which might be to do ... 34 involuntary context switches ... 895 block input operations ... I also want to add that snapshot removal is equally as ...
      (freebsd-stable)
    • Re: Backups / Dump etc
      ... > J> dump which will automatically snapshot the mounted filesystems. ... A snapshot is an abstraction of the state of the filesystem at ... When you start the snapshot, the only thing in the snap is the ...
      (freebsd-questions)