Error when using the CLI

I initially started with the Web version of Duplicacy and now would like to try the CLI as there seems to be some additional options when monitoring backups using Healthchecks.io. For example, I can schedule a windows task to send a curl start command to get less false positives with Healthchecks (as described from here). If there is a way to do this with the Web UI, please say so.

Anyway, I’m having trouble with using the CLI. My understanding is that the CLI is included with the Web version and is located here: C:\ProgramData.duplicacy-web\bin\duplicacy_win_x64_x.x.x.exe.

When executing the backup command to OneDrive, my understanding is that I must use the following syntax:

C:\ProgramData\.duplicacy-web\bin\duplicacy_win_x64_2.7.2.exe -log backup -storage OneDrive

However, when I do this I get the message “Failed to read the preference file from repository C:\ProgramData.duplicacy-web\bin: open C:\ProgramData.duplicacy-web\bin/.duplicacy/preferences: The system cannot find the file specified.”

I have located the preferences file in the “C:\ProgramData.duplicacy-web\repositories\localhost\all.duplicacy” folder and copied to the Bin folder but this does not correct. I’m wondering if I took a wrong turn somewhere.

Truthfully, I’d rather pay for the web version if I could still have the ability to harness the full power of Healthchecks reporting.

You can do that in web edition, on the backup tab (not schedules tab)

You need to do that from the currespodong duplicacy folder from the caches folder; the one that contains hidden .duplicacy sub folder

See this thread CLI commands with Web Edition

2 Likes

Hi @jadonr!

If you mean the trick to avoid false positives when laptop is not in use; this might work with GUI as well.

You can send the /start signal (https://hc-ping.com/your-check-url/start) every morning the computer is in use. (Use a scheduled task to run early in the morning, and include the setting to run if schedule missed.)
When used like this (with a start signal)
Period : The maximum time to wait for a successful signal, so 30 days might be OK, perhaps too short for some if they use the laptop seldom.
Grace : Time to wait after a start signal before expecting a backup

This sends a start-signal when your laptop is in use, telling healthchecks.io to expect a backup result.

Since :d: GUIs HTTP report feature will send a report whatever the result, you need to use the mail feature instead. You must tell GUI to include result in subject, and tell healthcheck.io to only accept a subject with “Success”.
Send mail only when backup fails

How to tell :d: to include result in mail subject :

Does this work for your use case? :slight_smile:

2 Likes

Does this only work by scheduling with Windows Task Scheduler? Or are you saying this should also work with the GUI?

Also, why does it need to run early in the morning?

I presume I would then need to configure the parameters in my Healthchecks.io account to define the Period as 30 days. What should I set the Grace to?

Thanks for the help!

You are correct!
Set up the task manually in windows. If doesn’t need to run really in the morning; it’s just how I tell windows to run it as soon as possible after a new day.

Grace means (in this scenario) how long until the backup should be finished after the /start signal had been sent. I you set 2 days (to avoid false positive in case you start the laptop to just check a little thing), just note this: A new /start signal before Grace has passed, will cancel the current and start a new “measurement”, so there is a potential to mask problems. Set Grace to less than 24 hours to avoid that situation. If you get too many or few warnings, adjust Grace.

Check your logs in healthhecks.io: Look for logged mail with subject “success” after every /start signal.

Thanks for asking!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.