Front page

Automated testing of backup restores

137fa7fabce442279879ae0c4341d051
AZTEC INTEGRATE REPAY

From: Dave Cottingham <dac@conceptual-analytics.com>
Date: Thu, 1 Sep 2016 11:12:50 -0400

   A trick that I've used to give me a bit of confidence is to randomly select
   a file, restore it, and compare to the original. This is completely
   scriptable. I haven't yet put it in a cron job, but that is my intention.
   The advantage is that it is much more approachable in terms of time and
   disk space than doing a complete restore.
   
   On Thu, Sep 1, 2016 at 10:19 AM, Paul Waring <paul@xk7.net> wrote:
   
   > I'm using obnam in a number of places now and I'm happy with how easy it
   > is to backup/restore. However, I'm conscious that I don't check whether the
   > backups are actually working. Does anyone have a way to automatically test
   > restores that they would like to share?
   >
   > I should probably also do manual restores from time to time, but anything
   > manual is likely to be forgotten. :)
   >
   > Thanks
   >
   > Paul
   >
   > --
   > Paul Waring
   > Freelance consultant
   > https://www.pwaring.com
   >
   > _______________________________________________
   > obnam-support mailing list
   > obnam-support@obnam.org
   > http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/ob
   > nam-support-obnam.org
   >
   >
From: Paul Waring <paul@xk7.net>
Date: Thu, 1 Sep 2016 15:19:15 +0100

   I'm using obnam in a number of places now and I'm happy with how easy it 
   is to backup/restore. However, I'm conscious that I don't check whether 
   the backups are actually working. Does anyone have a way to 
   automatically test restores that they would like to share?
   
   I should probably also do manual restores from time to time, but 
   anything manual is likely to be forgotten. :)
   
   Thanks
   
   Paul
From: Jan Brodda <jan@janbrodda.de>
Date: Thu, 01 Sep 2016 18:37:47 +0000

   If I remember correctly, obnam has also a command "verify", which compares
   your live data with the backed up files..
   
   Maybe take a look at the manpages to see if it does what you need.
   
   Dave Cottingham <dac@conceptual-analytics.com> schrieb am Do., 1. Sep. 2016
   um 17:13:
   
   > A trick that I've used to give me a bit of confidence is to randomly
   > select a file, restore it, and compare to the original. This is completely
   > scriptable. I haven't yet put it in a cron job, but that is my intention.
   > The advantage is that it is much more approachable in terms of time and
   > disk space than doing a complete restore.
   >
   > On Thu, Sep 1, 2016 at 10:19 AM, Paul Waring <paul@xk7.net> wrote:
   >
   >> I'm using obnam in a number of places now and I'm happy with how easy it
   >> is to backup/restore. However, I'm conscious that I don't check whether the
   >> backups are actually working. Does anyone have a way to automatically test
   >> restores that they would like to share?
   >>
   >> I should probably also do manual restores from time to time, but anything
   >> manual is likely to be forgotten. :)
   >>
   >> Thanks
   >>
   >> Paul
   >>
   >> --
   >> Paul Waring
   >> Freelance consultant
   >> https://www.pwaring.com
   >>
   >> _______________________________________________
   >> 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: Maximilian Gaukler <development@maxgaukler.de>
Date: Thu, 1 Sep 2016 22:14:37 +0200

   Your use-case is probably handled best by `obnam verify`:
   Quoting the manual:
   > verify compares data in the backup with actual user data, and makes sures they are identical.  It is most useful to run immediately after a backup, to check that it actually worked.  It can be run at any time, but  if  the user data has changed, verification fails even though the backup is OK.
   
   If you know your data, you can also do `obnam mount` and look at files 
   inside the mounted backup.
   
   If files may already have changed since last backup, your next resort is 
   `obnam fsck`, which only looks at the repository but not at your local data.
   As far as I can tell, if `obnam fsck` correctly passes, then `restore` 
   should work as well. It may also report somewhat harmless internal 
   errors that can result from aborting in the middle of a backup.
   
   To get a better feeling for the robustness of obnam, you could simply 
   play around manually by with a test folder, e.g. do a backup into a 
   second test folder, try to damage the backup by removing or changing 
   files, and see what happens on verify, fsck and restore.
   
   Looking at similar questions from a development point of view, I 
   recently started playing around with automated testing of obnam with 
   synthetic test data to find possible bugs. There is already a huge 
   amount of tests in the obnam codebase to test specific scenarios such as 
   missing files in the backup. I wrote another script for a somewhat 
   random testing of restore and fsck:
   https://raw.githubusercontent.com/fau-fablab/obnam/mg/unused-chunks/test-fsck
   Currently, it can simulate aborted backups, try if fsck can fix them and 
   also check the outcome of a restore. If you are interested in further 
   development, feel free to have a look at my repository 
   https://github.com/fau-fablab/obnam/tree/mg/unused-chunks or the 
   official codebase.
   
   _______________________________________________
   obnam-support mailing list
   obnam-support@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-support-obnam.org