Front page

Migrating old backups to obnam

c14ec422d4d74aaca6dd36ea1905dced
SNAPLINE DISTORTION SNOWSLIDE

From: "Neal H. Walfield" <neal@walfield.org>
Date: Sat, 29 Jul 2017 10:58:34 +0200

   Hi,
   
   I'm transitioning to obnam.  (I've actually been using it for about
   three or four years in a smaller backup solution, and I've been quite
   happy with it.  Thanks!)
   
   I'd like to add my old backups to my obnam repository.  Unfortunately,
   the meta-data is going to be wrong in several places:
   
     - The time of the backup will be the current time.  My tests suggest
       that using faketime tricks obnam at least with respect to 'obnam
       generations', but perhaps there are other places where this might
       be a problem.
   
     - The absolute path will be wrong.  That is, I normally backup
       /home, but I don't want to restore by old backups to /home,
       because I need to keep using my NAS during the migration :).  Is
       there a way to fake the path so that obnam ls show /home instead
       of /restore?
   
       (Actually, I backup /home/.zfs/snapshots/backup and would prefer
       that it show up as /home in the backup.  But this is a variant of
       the same problem.)
   
     - Generations will be "out of order".  I imagine this could be a
       problem with respect to aging.  For instance, if obnam assumes
       that a numerically larger generation is necessarily younger.  Is
       something like this the case?  If so, then I guess the simpliest
       solution is to migrate the backups in order.
   
   Thanks!
   
   :) Neal
   
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: SanskritFritz <sanskritfritz@gmail.com>
Date: Sat, 29 Jul 2017 13:12:48 +0200

   Why insist on having only one repo? You could reserve a separate repo for
   the old backups.
   
   
   
   On Sat, Jul 29, 2017 at 10:58 AM, Neal H. Walfield <neal@walfield.org>
   wrote:
   
   > Hi,
   >
   > I'm transitioning to obnam.  (I've actually been using it for about
   > three or four years in a smaller backup solution, and I've been quite
   > happy with it.  Thanks!)
   >
   > I'd like to add my old backups to my obnam repository.  Unfortunately,
   > the meta-data is going to be wrong in several places:
   >
   >   - The time of the backup will be the current time.  My tests suggest
   >     that using faketime tricks obnam at least with respect to 'obnam
   >     generations', but perhaps there are other places where this might
   >     be a problem.
   >
   >   - The absolute path will be wrong.  That is, I normally backup
   >     /home, but I don't want to restore by old backups to /home,
   >     because I need to keep using my NAS during the migration :).  Is
   >     there a way to fake the path so that obnam ls show /home instead
   >     of /restore?
   >
   >     (Actually, I backup /home/.zfs/snapshots/backup and would prefer
   >     that it show up as /home in the backup.  But this is a variant of
   >     the same problem.)
   >
   >   - Generations will be "out of order".  I imagine this could be a
   >     problem with respect to aging.  For instance, if obnam assumes
   >     that a numerically larger generation is necessarily younger.  Is
   >     something like this the case?  If so, then I guess the simpliest
   >     solution is to migrate the backups in order.
   >
   > Thanks!
   >
   > :) Neal
   >
   >
   > _______________________________________________
   > obnam-support mailing list
   > obnam-support@obnam.org
   > http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/ob
   > nam-support-obnam.org
   >
From: Lars Wirzenius <liw@liw.fi>
Date: Sat, 29 Jul 2017 16:19:03 +0300

   On Sat, Jul 29, 2017 at 10:58:34AM +0200, Neal H. Walfield wrote:
   > I'd like to add my old backups to my obnam repository.
   
   Why?
   
   >   - The time of the backup will be the current time.  My tests suggest
   >     that using faketime tricks obnam at least with respect to 'obnam
   >     generations', but perhaps there are other places where this might
   >     be a problem.
   
   See the --pretend-time option in Obnam, there for tests.
   
   >   - The absolute path will be wrong.  That is, I normally backup
   >     /home, but I don't want to restore by old backups to /home,
   >     because I need to keep using my NAS during the migration :).  Is
   >     there a way to fake the path so that obnam ls show /home instead
   >     of /restore?
   
   There is no way to fake this in Obnam. It would be possible to add a
   hook that a plugin could use to transmogrify pathnames, but I've never
   been bothered enough to do that. If you do, please send a patch. :)
   
   >   - Generations will be "out of order".  I imagine this could be a
   >     problem with respect to aging.  For instance, if obnam assumes
   >     that a numerically larger generation is necessarily younger.  Is
   >     something like this the case?  If so, then I guess the simpliest
   >     solution is to migrate the backups in order.
   
   Do them in order, yes.
From: "Neal H. Walfield" <neal@walfield.org>
Date: Mon, 31 Jul 2017 17:12:34 +0200

   On Sat, 29 Jul 2017 13:12:48 +0200,
   SanskritFritz wrote:
   > Why insist on having only one repo? You could reserve a separate repo for the old backups.
   
   That's true.  But, it would waste about a TB of space :/.
   
   > On Sat, Jul 29, 2017 at 10:58 AM, Neal H. Walfield <neal@walfield.org> wrote:
   > 
   >  Hi,
   > 
   >  I'm transitioning to obnam. (I've actually been using it for about
   >  three or four years in a smaller backup solution, and I've been quite
   >  happy with it. Thanks!)
   > 
   >  I'd like to add my old backups to my obnam repository. Unfortunately,
   >  the meta-data is going to be wrong in several places:
   > 
   >  - The time of the backup will be the current time. My tests suggest
   >  that using faketime tricks obnam at least with respect to 'obnam
   >  generations', but perhaps there are other places where this might
   >  be a problem.
   > 
   >  - The absolute path will be wrong. That is, I normally backup
   >  /home, but I don't want to restore by old backups to /home,
   >  because I need to keep using my NAS during the migration :). Is
   >  there a way to fake the path so that obnam ls show /home instead
   >  of /restore?
   > 
   >  (Actually, I backup /home/.zfs/snapshots/backup and would prefer
   >  that it show up as /home in the backup. But this is a variant of
   >  the same problem.)
   > 
   >  - Generations will be "out of order". I imagine this could be a
   >  problem with respect to aging. For instance, if obnam assumes
   >  that a numerically larger generation is necessarily younger. Is
   >  something like this the case? If so, then I guess the simpliest
   >  solution is to migrate the backups in order.
   > 
   >  Thanks!
   > 
   >  :) Neal
   > 
   >  _______________________________________________
   >  obnam-support mailing list
   >  obnam-support@obnam.org
   >  http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
   > 
   > [2  <text/plain; us-ascii (7bit)>]
   > _______________________________________________
   > obnam-support mailing list
   > obnam-support@obnam.org
   > http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: "Neal H. Walfield" <neal@walfield.org>
Date: Mon, 31 Jul 2017 17:24:38 +0200

   On Sat, 29 Jul 2017 15:19:03 +0200,
   Lars Wirzenius wrote:
   > On Sat, Jul 29, 2017 at 10:58:34AM +0200, Neal H. Walfield wrote:
   > > I'd like to add my old backups to my obnam repository.
   > 
   > Why?
   
   Two anecdotes:
   
     - In 2003, I took some nice pictures.  Several years later, I looked
       at them and found that some were corrupted!  Unfortunately, the
       corruption was older than my oldest backup at the time.  This was
       in the days prior to 'zfs scrub'.
   
     - A few weeks ago, I realized that some files were inadvertently
       deleted in 2014.  Using my old backups, I was able to restore
       them.
   
   > >   - The time of the backup will be the current time.  My tests suggest
   > >     that using faketime tricks obnam at least with respect to 'obnam
   > >     generations', but perhaps there are other places where this might
   > >     be a problem.
   > 
   > See the --pretend-time option in Obnam, there for tests.
   
   Thanks!
   
   > >   - The absolute path will be wrong.  That is, I normally backup
   > >     /home, but I don't want to restore by old backups to /home,
   > >     because I need to keep using my NAS during the migration :).  Is
   > >     there a way to fake the path so that obnam ls show /home instead
   > >     of /restore?
   > 
   > There is no way to fake this in Obnam. It would be possible to add a
   > hook that a plugin could use to transmogrify pathnames, but I've never
   > been bothered enough to do that. If you do, please send a patch. :)
   
   I'll probably live with it as is, thanks!
   
   > >   - Generations will be "out of order".  I imagine this could be a
   > >     problem with respect to aging.  For instance, if obnam assumes
   > >     that a numerically larger generation is necessarily younger.  Is
   > >     something like this the case?  If so, then I guess the simpliest
   > >     solution is to migrate the backups in order.
   > 
   > Do them in order, yes.
   
   Ok!
   
   :) Neal
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Ian Campbell <ijc@hellion.org.uk>
Date: Tue, 01 Aug 2017 11:13:53 +0100

   On Sat, 2017-07-29 at 10:58 +0200, Neal H. Walfield wrote:
   >   - The absolute path will be wrong.  That is, I normally backup
   >     /home, but I don't want to restore by old backups to /home,
   >     because I need to keep using my NAS during the migration :).  Is
   >     there a way to fake the path so that obnam ls show /home instead
   >     of /restore?
   
   You could bind /restore into /home inside a container/chroot and do the
   migration from inside. You'd need to install a distro into the
   container and bind in your obnam repo too.
   
   Or perhaps by making a new mount namespace using your existing root you
   could bind /restore to /home inside that (which wouldn't effect the
   host mount namespace), bit advanced that though and I'm not sure of the
   actual steps which would be needed...
   
   Ian.
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org
From: Lars Wirzenius <liw@liw.fi>
Date: Tue, 1 Aug 2017 12:02:47 +0300

   On Mon, Jul 31, 2017 at 05:24:38PM +0200, Neal H. Walfield wrote:
   > Two anecdotes:
   > 
   >   - In 2003, I took some nice pictures.  Several years later, I looked
   >     at them and found that some were corrupted!  Unfortunately, the
   >     corruption was older than my oldest backup at the time.  This was
   >     in the days prior to 'zfs scrub'.
   > 
   >   - A few weeks ago, I realized that some files were inadvertently
   >     deleted in 2014.  Using my old backups, I was able to restore
   >     them.
   
   That explains why want to keep old backups, but that's not in
   question. Why do you want to convert them to Obnam? Why not keep old
   backups the way they are and only make new backups with Obnam?
From: Andrew Ruthven <andrew@etc.gen.nz>
Date: Tue, 01 Aug 2017 19:41:53 +1200

   On Mon, 2017-07-31 at 17:12 +0200, Neal H. Walfield wrote:
   > On Sat, 29 Jul 2017 13:12:48 +0200,
   > SanskritFritz wrote:
   > > Why insist on having only one repo? You could reserve a separate
   > > repo for the old backups.
   > 
   > That's true.  But, it would waste about a TB of space :/.
   
   Backup to the same repo, but use a different client name, for example:
   
     obnam --client-name $HOSTNAME-old-backups $path_to_backup_extract
   
   If you aren't using per client encryption then de-dup will still be
   applied.
   
   Cheers,
   Andrew