Backup of Duplicacy config files

I know this has been answered elsewhere, I’m just struggling to get the correct syntax in order to backup the config files. This is what I’m using:

+ProgramData/.duplicacy-web/filters/*
+ProgramData/.duplicacy-web/duplicacy.json
+ProgramData/.duplicacy-web/gcd-token.json
+ProgramData/.duplicacy-web/licenses.json
+ProgramData/.duplicacy-web/settings.json
-Users/Username/.duplicacy-web/*
-ProgramData/.duplicacy-web/*

Note - Both /users/ and /programdata/ directories have the duplicacy config files. Not sure why, this is despite installing it as a service. I think it must of installed as a service, and as a user…

Neither of these directories are appearing in my backups:

ProgramData/.duplicacy-web
Users/Username/.duplicacy-web/
1 Like

You need to include the intermediate directories like ProgramData/ and ProgramData/.duplicacy-web/ (otherwise Duplicacy won’t descend into those directories) and and then exclude all other directories (with -*/):

+ProgramData/
+ProgramData/.duplicacy-web/
+ProgramData/.duplicacy-web/filters/*
+ProgramData/.duplicacy-web/duplicacy.json
+ProgramData/.duplicacy-web/gcd-token.json
+ProgramData/.duplicacy-web/licenses.json
+ProgramData/.duplicacy-web/settings.json
-Users/Username/.duplicacy-web/*
-ProgramData/.duplicacy-web/*
-*/

These folders

+ProgramData/
+ProgramData/.duplicacy-web/

should come after the “deepest” folders, right? (and in reverse order)

+ProgramData/.duplicacy-web/filters/*
+ProgramData/.duplicacy-web/duplicacy.json
+ProgramData/.duplicacy-web/gcd-token.json
+ProgramData/.duplicacy-web/licenses.json
+ProgramData/.duplicacy-web/settings.json
+ProgramData/.duplicacy-web/
+ProgramData/
-Users/Username/.duplicacy-web/*
-ProgramData/.duplicacy-web/*
-*/

1 Like

I think the issue is that the restore browser doesn’t show hidden folders, and ProgramData/.duplicacy-web/ is a hidden folder. Does this sound right?

I may be rather stupid here. but wouldn’t backing up the config files with Only Duplicacy be rather redundant,

If the Config Files become corrupt / missing, how can you restore the config in event of this happening?

or am i missing something?

Yes, for this use case you are correct, it would not make sense to use :d: itself.

But there are other cases: reverting to a previous configuration (from a few days ago), restoring the complete configuration to a new computer on which you have just done a new/fresh installation, etc.

BTW, in line with your observation, for backing up the :d: config files, I use Rclone. :wink:

1 Like

Hi Towerbr,

RCLONE is a good call, do you have this Automated? if so, would you mind sharing your Automated Script? (minus of course the Private Details) if thats possible?

Thanks Kindly.!

It’s not really a script, just two scheduled calls to rclone sync:

RCLONE sync "C:/Users/[my user]/.duplicacy-web" "[B2 bucket rclone storage name]:/.duplicacy-web" "--filter-from" "path to filter.txt"  "--fast-list" "--backup-dir" "[B2 bucket rclone storage name]:/[versions-folder]"]

RCLONE sync "C:/Users/[my user]/AppData/Local/DuplicacyWebEdition" "[B2 bucket rclone storage name]:/AppData-Local-DuplicacyWebEdition" "--filter-from" "path to filter.txt"  "--fast-list" "--backup-dir" "[B2 bucket rclone storage name]:/[versions-folder]"]

The second is obviously not necessary (since you only need to install it), but I do it to have “everything ready” if necessary, the size at the storage is minimal.

Filter: - *cache**

So that the “versions folder” has subfolders by date and time, I use this:

set varHOUR=%time:~0,2%
if "%varHOUR:~0,1%" == " " set varHOUR=0%varHOUR:~1,1%

set varMIN=%time:~3,2%
if "%varMIN:~0,1%" == " " set varMIN=0%varMIN:~1,1%

set varSEC=%time:~6,2%
if "%varSEC:~0,1%" == " " set varSEC=0%varSEC:~1,1%

set varYEAR=%date:~-4,4%

set varMONTH=%date:~3,2%
if "%varMONTH:~0,1%" == " " set varMONTH=0%varMONTH:~1,1%

set varDAY=%date:~0,2%
if "%varDAY:~0,1%" == " " set varDAY=0%varDAY:~1,1%


set varDATE=%varYEAR%-%varMONTH%-%varDAY%

set varTIME=%varHOUR%-%varMIN%-%varSEC%

set VERSIONS-FOLDER=!DESTINATION-BASE-VERSIONS-FOLDER!/!varYEAR!-!varMONTH!/!varDATE!-!varTIME!/

1 Like

Hi Towerbr,

Appreciate the time to write that up! will do something like that myself for each Windows Box point towards an individual folder per Host name.

Thanks dude!

1 Like

Question. What’s the point in backing up duplicacy configuration periodically?

It is not supposed to ever change, so you can save it once after major changes, but keeping filtering rules just wastes battery parsing them on every backup.

1 Like

Sure, it wouldn’t have to be periodic, it’s just to be “one less thing to remember” (backup after major changes). Setup and forget.

Modifications are really rare, just a filter or small schedule adjustments, but I haven’t modified anything in a few months.

And as Rclone directly compares files (instead of generating chunks), storage does not grow.

Are you saying that if I brick my machine that is being backed up, and duplicacy config files are not stored anywhere else (outside of backup chunks), by backups are as good as gone?

1 Like

No. You can initialize repo again, linked to the same storage (and provide the same encryption key, if you enabled encryption). Then you can restore your data. For this to happen you need to keep credentials to your cloud storage, and encryption password and/or keys, somewhere else.

It’s just easier to keep them in Duplicacy config files. But not strictly required. Just keep them somewhere safe, other than in the Duplicacy backup obviously.

2 Likes

This is a really important point, which should be self-evident but I’m sure its bitten someone…without the encryption key your backups ARE useless.

So keeping your keys etc safe is very important

1 Like

This didn’t work. I was testing the x86 qpkg, then realized that I should be using the x86_64 qpkg. so I:

  1. Restored the saved configuration to /share/Download
  2. Removed x86 qpkg
  3. Installed x86_64 qpkg
  4. Stopped the qpkg
  5. Copied the saved configuration files over the installed qpkg files (see attachments)
  6. Started the qpkg

The web UI shows no configuration. What went wrong? Do I need to start over, or is there a way to recover?

duplicacy_web.log.txt (22.7 KB) restore-config.txt (6.4 KB)