How to restore data and then setup backup again?

Hi everyone,

Sorry if this is a very basic question. I’ve searched the docs but can’t find a clear answer.

I am considering a total data loss scenario.

I already know (and tested) how to restore the data from the backup, even if the backup job settings and local DB are lost. That part works all right.

However, after the data restore operation is completed, I’d like to set up again the original backup job against the same back-end so that backup continues to work as it used to before the crash, e.g…: only the modified (“delta”) data is backed up, old backups are purged as per the retention policy, etc…

I assume if I do it the wrong way, it will “ignore” the existing backups and I will end up with a (very long) full backup, double storage usage on the back-end, and old backups never purged.

What is the right way to do restore the backup job?
(if possible, without an export of the original backup job settings)

Thanks in advance!!

Gaston

First, I would export your existing backup set into a file. This makes it easy to restore the backup settings you are already using. Including Source, Destination, Password etc.

Afterwards you import this data. Assuming your backup is at the same location as before and the data on the same location you can simply start the backup. It will detect the destination already has data in it, and because the local database is missing Duplicati informs you about the need to repair your database.

After repairing / recreating your local database you start you backup again and only the diffs are going to transferred.

You could also backup the database of your backup set, but therefor you need to use a extra backup set or another process, this would just save you lots of time restoring the DB afterwards.

Some quite nice articles

1 Like

Hi Herbert,

Thanks much for your reply and sorry to ask again. Would both below methods work?

Method 1:

  • Step 1: Restore all data from the backup using the “Direct restore from backup files” option.
  • Step 2: Import the backup job definition and recreate local DB (as you explained in your post).
  • Step 3: Start backup again (only diffs are going to be transferred).

Or:

Method 2:

  • Step 1: Import the backup job definition and recreate local DB (as you explained in your post).
  • Step 2: Restore all data from the backup using the backup job’s “Restore files…” option.
  • Step 3: Start backup again (only diffs are going to be transferred).

Thanks in advance,

Gaston

1 Like

Seems fine for me.
Method 2 was never tested, but Method 1 was used this way already by me.

HI!
Just a thing: If you restore data from backup and next import the backup definition and recreate the DB you waste your time because the direct restore from DB procedure create a temporary DB wich is throw away when the procedure finished. I suggest to use the method 2.

Both methods should work. I have used Method 2 more than once. Remember to disable the schedule when you are importing the job. Re-enable it after all your data is restored and you’re ready to start backing up again.

Wonderful discussion. The only thing I’d add is that I think Settings in Duplicati aren’t in the job exports. The main thing I’d worry about is if you have any essential information in Default options for all jobs.

Good reminder… I view the global Default Options “as text” so I can copy/paste it into a text file for safe keeping. The other options on that page are not difficult to reconfigure manually.

Hi Everyone,

Thanks for your help! Method 2 worked perfectly.
Below is a step by step summary of how to do in case somebody else needs to do it in the future:

Scenario

After a total data loss, you would like to restore all data from backup and set up again backup job as before the data loss occurred.

Prerequisites

  • OS + Duplicati installation files (if you also lost your OS).
  • Encryption password for your backup (obviously!).
  • Text export of Duplicati “Default options” [alternatively, if you don’t have the export, you can configure them manually if you remember the settings].
  • Encrypted (for security) export of your backup settings [alternatively, if you don’t have the export, you can configure it manually if you remember the settings].

Advice: keep all above prerequisites in the same location as the backup, so in case of total data loss you have everything you need in one place. The backup settings file must be encrypted as it contains the encryption password of your backup files!

Howto - Disaster recovery

  1. Install the OS and Duplicati (see prerequisites, if you also lost your OS).
  2. Launch Duplicati.
  3. Configure Duplicati’s “Default options” using the text export (see prerequisites).
  4. Click “Add backup”.
  5. Select “Import from a file”, and click “Next”.
  6. Select the encrypted backup export file (see prerequisites), input the password, and click “Import”.
  7. Click “Next” until you arrive to the “Schedule” page.
  8. Uncheck “Automatically run backups”, then click “Next” (this will prevent automatic scheduled backup from launching until you finalize the full data restore).
  9. Click “Save”.
  10. Click “Home”.
  11. Expand your backup profile.
  12. Click “Database…”.
  13. Click “Repair”, and wait until the task completes (this will rebuild your local database from the backup location).
  14. Click “Restore”.
  15. Select your backup profile, and click “Next”.
  16. Select all files that need to be restored and click “Next”.
  17. Select “Original location”, select “Overwrite”, and click Restore.
  18. Wait until the restore completes. At this point, all your files have been restored.
  19. Click “Home”.
  20. Expand your backup profile.
  21. Under configuration, click “Edit…”.
  22. Click “Next” until you arrive to the Schedule sheet.
  23. Check “Automatically run backups”, and restore the original backup schedule.
  24. Click “Next”, then click “Save”.
  25. Click “Home”.
  26. Under your backup profile, click “Run now” and wait until it completes (it should not take long). At this point, we have confirmed the backup is operational again.

Hope it helps!

Cheers,

Gaston

4 Likes

@gdassieu
This would be something for the wiki I assume, would do the others say

I’m not sure who reads what. The wiki (being in GitHub) is older than the forum, so gets little new info.
It would be reasonable to at least change the category of this from Support to How-To to add visibility.
@gdassieu probably has an edit control to the right of the topic Subject field that can do that change.

The most visible (and most work) option would be to add a section to the manual, as described below.

Duplicati User’s Manual

Corrections/changes/additions may be submitted as a pull request at Github: GitHub - kees-z/DuplicatiDocs: Duplicati User's Manual

What I’d really like is if someday there can be enough documentation volunteers to give an easier way. There are definitely topics that keep coming up in the forum. How-To is a step. Manual might be better.

Hi @ts678
Couldn’t find the option to do that. Can you help with more detailed instructions or screenshot?
Best,
Gaston

You as original author don’t get to edit using pencil icon at far right? That seems odd. I can do it for you.

Sorry, no I can’ t see it even if I hover the mouse over it.
Feel free to do it instead of me, thanks!