GUI shows only 1 version + permission restore problem

Hello,

I’ve recently switched from Cobian Reflector to Duplicati 2 and so far so good but I have 2 issues that remain to be unsolved.

  1. I have a backup job that uploads stuff (an entire folder) to an external SFTP storage. It’s running every day, successfully. In the settings I chose to keep 7 days of backup but for some reason this job still has only 1 versions according to the GUI. There are definitely some files that have been modified since the last backup. What’s going on?

  2. I wanted to test if I can restore (because a backup is not a backup until you tested restore) and it works great except the permissions. Even if I check to restore permissions the files do not have the same permissions as the source - it’s a Windows environment with Active Directory. What am I missing?

Thanks in advance!

BB

Hello

Can you export the job, rename the file as .txt, edit it as needed to remove private info, and post it here ?

Do you run Duplicati as a service ? If you run it as a mere user, it will have trouble restoring rights.

Hi! Thanks for the quick reply! Yes, duplicati is running as a service!

{
  "CreatedByVersion": "2.0.7.1",
  "Schedule": {
    "ID": 2,
    "Tags": [
      "ID=3"
    ],
    "Time": "2023-09-13T02:00:00Z",
    "Repeat": "1D",
    "LastRun": "2023-09-12T02:00:00Z",
    "Rule": "AllowedWeekDays=Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
    "AllowedDays": [
      "mon",
      "tue",
      "wed",
      "thu",
      "fri",
      "sat",
      "sun"
    ]
  },
  "Backup": {
    "ID": "3",
    "Name": "JobNameGoesHere",
    "Description": "",
    "Tags": [],
    "TargetURL": "###",
    "DBPath": "C:\\Users\\###\\AppData\\Local\\Duplicati\\BZJLPQRXLX.sqlite",
    "Sources": [
      "D:\\Scan\\"
    ],
    "Settings": [
      {
        "Filter": "",
        "Name": "encryption-module",
        "Value": "aes",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "compression-module",
        "Value": "zip",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "dblock-size",
        "Value": "50mb",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "keep-time",
        "Value": "7D",
        "Argument": null
      }
    ],
    "Filters": [],
    "Metadata": {
      "LastBackupDate": "20230912T020000Z",
      "BackupListCount": "1",
      "TotalQuotaSpace": "0",
      "FreeQuotaSpace": "0",
      "AssignedQuotaSpace": "-1",
      "TargetFilesSize": "4722777989",
      "TargetFilesCount": "185",
      "TargetSizeString": "4,40 GB",
      "SourceFilesSize": "4863282173",
      "SourceFilesCount": "7500",
      "SourceSizeString": "4,53 GB",
      "LastBackupStarted": "20230912T020000Z",
      "LastBackupFinished": "20230912T020107Z",
      "LastBackupDuration": "00:01:07.1259837",
      "LastCompactDuration": "00:00:01.6097049",
      "LastCompactStarted": "20230912T020039Z",
      "LastCompactFinished": "20230912T020041Z",
      "LastErrorDate": "20230905T200034Z",
      "LastErrorMessage": "database is locked\r\ndatabase is locked"
    },
    "IsTemporary": false
  },
  "DisplayNames": {
    "D:\\Scan\\": "Scan"
  }
}

I’m afraid that this does not look right. If you run Duplicati as a service, why is the job database under an user account ? Maybe you have installed Duplicati as a service, but you are running it as an user.
Unfortunately this is possible. To avoid that, close the running Duplicati and replace the start Duplicati icon by a link redirecting to http://localhost:8200 (and start the Duplicati service if needed).
If (as I suspect) you have asked for Duplicati to start automatically, go to c:\users\all users\microsoft\windows\Start Menu\Programs\Startup and remove the duplicati link created here.
When you install Duplicati as a service, Duplicati should NOT start as an user task else troubles appear.

Edit: I forgot to add that after really using Duplicati as a service, you will miss your existing job (that is under your personal account). You can get around that by copying by hand the database files to c:\windows\system32\config\systemprofile\Appdata\Local\Duplicati

This does not looks right either but it may be a following of the preceding problem.

Yeah, that was a problem first but I migrated Duplicati to run as a service based on this: Migrating from User to Service install on Windows - How-To - Duplicati

However, it was suspicous that after a reboot not all of my jobs was showing up in the GUI, I had to stop the application and restart the service. I assume this migration was not succesful completely. Duplicati service is running as a local system account now. Duplicati as an application is not running now (no system tray icon) and I access the GUI on localhost:8200

In your place I’d move the Duplicati files under the account user under a different directory to ensure that these settings are not used. Then check again the settings in the Duplicati user interface and check the results of next backup.

Could you please give me a quick step-by-step guide about what to do just to make sure I get it right and I don’t screw it up entirely? :smiley:

Well, I don’t the exact situation of your system. All I can say is that you have files under

C:\\Users\\###\\AppData\\Local\\Duplicati\

move them to another directory. Look what happens. If you can’t find your backup job in the Web UI, you are still running Duplicati as an user.

Well, I moved Duplicati data from the user folder to a separated folder on C:\ but the version problem still exists. I modified this jobs settings to use the database at the new location, clicked “Run Now…” and theres still only 1 version.

Viewing the log files of a backup job. <job> → Show log, find yours, look at source stats. Example:

image

If nothing changed, then you can still try to force it to create a version by checking Advanced option:

upload-unchanged-backups

If no files have changed, Duplicati will not upload a backup set.

which version? The v3 linked near top is probably the best choice.

Mine shows this which is impossible because I’ve credted a text file in the folder.

image

I think I used a different method to migrate.

By the way, why is it so complicated? Is it planned to have an option in the installer to install it as a service so people don’t have to go trough this nightmare?

Different ways to make a Duplicati backup gives some clue. It’s so flexible that assembly can be hard.
It also runs on numerous operating systems, and how to set service (or not) varies rather enormously.

Know anyone who knows how to write that installer? Duplicati’s person is not available in recent years.
There are definitely some requests, but that in itself doesn’t bring resources (which are still too scarce).

Possibly the manual could be improved (help needed there too), to allow a plan in advance for service.
Duplicati Tutorial 02 Install Duplicati as a Service shows (but who’s going to find it?) that it’s not so bad getting a simple configuration up. Migration is hard and maybe should be moved to the manual (help?).

The first method looks like it didn’t move databases quite right. Another reason to retire it as temptation.

Timing counts. If you created it awhile ago and nothing else changed, the display is right. How about an experiment of either looking for the file in the restore, making new test file and doing a backup, or using Advanced option to force a backup? If you know you created a file just before this backup, check config.

If need be, you can watch Verbose level logs either GUI live or in a log-file to watch handling of your file.

So that was certainly not easy to migrate a previously screwed migration again as I lost 2 jobs as well along the process but eventually I was able to figure out everything and all seems to be perfect now, the databases are at the correct location and everything is running. I also spent a lot of time reading a documentation and learned a lot meanwhile, I was able to set up e-mail notifications as well.

Regarding your comments about the lack of contributors - I know it’s a problem and I’m willing to help as well, even tho my programming capabilites has somewhat faded in the recent years as I moved to system administration/engineering.

One last question, maybe slightly off-topic: what is the difference these two backup retention policies?

  • Keep a specific number of backups

  • Delete backups that are older than

So I’m running tasks once every day and I want to keep backups for a week. I set it to 7 days - whats the difference here?

They do what they say, so in your case they would be the same under normal circumstances.
But, if you for example turn the computer off for a week, the next backup after would delete all versions except the newest if you select time, while the number of versions would keep more versions. It depends what you want, but I think number of versions is a safer choice.

It doesn’t have to be programming, or it can be trying to follow code rather than churning out new code. That’s pretty much where I am, but it’s also enough to help chase down bugs or assist forum or manual.

If you can use GitHub, then manual work becomes easier, and there are some needed topics right here.
This is the second time in the past day that I’ve suggested documenting things when lacking ideal code.

Contributing in any ways could offload some other people to do other things, and would be appreciated.
There would be some initial learning of course, but with time and persistence one gets good at things…