Restore Operation initiated on WebApp stopped with no indication of what happened

Hi - I had a restore operation in progress initiated from Duplicacy WebApp and I was expecting it to run for 8+ hours and suddenly the HDD buzz stopped after an hour - only to realize that the restore stopped.

WebApp’s Restore tab is not showing the progress anymore and an empty form greets me to start a new one.

Looking at the logs, I see that the restore operation stopped at 11.6%

2023-01-14 06:23:44.263 INFO DOWNLOAD_PROGRESS Downloaded chunk 22202 size 9405461, 29.03MB/s 07:50:41 11.6%

How do I investigate what happened?

Check the log file ~/.duplicacy-web/logs/duplicacy_web.log. There should be a log message showing what error it was.

Hmmm - “Duplicacy was aborted” - I am not sure how this happened

2023/01/14 06:23:34 Deleted listing session 003w
2023/01/14 06:23:44 Stopping the restore operation in session yo3gl
2023/01/14 06:23:44 Failed to restore files for backup AAviMasterDataStore revision 8 in the storage Avi-Seagate6TB-DuplicacyStore: Duplicacy was aborted
2023/01/14 06:23:44 closing log file restore-20230114-052129.log
2023/01/14 06:24:04 Deleted restore session yo3gl

Looks like web UI deliberately killed restore.

I think at this point if the browser session fails the restore is cancelled. (Ridiculously inappropriate, let alone inconsistent, design choice, IMO).

I restarted the restore operation and undocked the browser tab to avoid messing with it by mistake - but looks like this attempt also got yanked out at ~50%

The nuance is that the browser tab is still alive - I did not “close it”. I don’t remember if I minimized OR hid the browser tab - it was by itself in a separate window.

> 2023/01/14 09:43:03 127.0.0.1:61153 POST /start_restore
> 2023/01/14 09:43:03 Created log file /Users/hiavi/.duplicacy-web/logs/restore-20230114-094303.log
> 2023/01/14 09:43:03 Created restore session 5012wi
> 2023/01/14 09:43:03 Running /Users/hiavi/.duplicacy-web/bin/duplicacy_osx_x64_3.1.0 [-log restore -r 8 -storage Avi-Seagate6TB-DuplicacyStore -overwrite -stats -threads 4 --]
> 2023/01/14 09:43:03 Set current working directory to /Users/hiavi/.duplicacy-web/repositories/localhost/restore
> 2023/01/14 09:43:19 Deleted restore session mwodmj
> 2023/01/14 14:17:54 Deleted listing session 8qicur
> 2023/01/14 14:18:04 Stopping the restore operation in session 5012wi
> 2023/01/14 14:18:04 Failed to restore files for backup AAviMasterDataStore revision 8 in the storage Avi-Seagate6TB-DuplicacyStore: Duplicacy was aborted
> 2023/01/14 14:18:04 closing log file restore-20230114-094303.log
> 2023/01/14 14:18:24 Deleted restore session 5012wi
> 2023/01/14 18:38:35 Invalid session

OS Version: Mac Ventura 13.1
Browser: Edge Version 109.0.1518.49 (Official build) (arm64)
Dashboard Page is showing : Duplicacy Web Edition 1.5.0
Settings Page is showing: Command Line Current Version 3.1.0

Question 1: What is the recommendation for users to ensure the operation doesn’t keep failing?

Question 2: I tried to restart the Restore operation and added debug flag to options to see if I can gather more detailed info. But I am seeing an “Incorrect Usage” error. Why cannot we use the global debug flag?

2023/01/14 21:40:08 Running /Users/hiavi/.duplicacy-web/bin/duplicacy_osx_x64_3.1.0 [-log restore -r 8 -storage Avi-Seagate6TB-DuplicacyStore -overwrite -stats -threads 4 -d --]
2023/01/14 21:40:08 Set current working directory to /Users/hiavi/.duplicacy-web/repositories/localhost/restore
2023/01/14 21:40:08 CLI: Incorrect Usage.

Well… Start with using Safari. Who knows what sort of compatibility issues edge has. Maybe the page leaks and gets killed, or any number of other issues…

Oops - looks like you pushed a reply as I was making an edit to my note :slight_smile: (love this community) - I updated the comment with a second question about seeing a different failure with debug flag.

Heh :slight_smile: No problem, I do that all the time :D.

Is there a “global” flag section? Try adding it there. But I don’t think you’ll see much there – CLI is being killed by the web instance, from the looks of it.

All those “deleted restore session” look suspicious.

Try with Safari.Or Firefox. I would avoid Microsoft products altogether, let alone on a foreign platform: they can’t keep their stuff together on Windows as it is, and with three and a half people using Edge, let alone on other OSes, it does not get nearly enough exposure to find and squash bugs like these. (Edge benefits Microsoft advertising business, not you.)

On WebApp there is no “global” flags section - there is just an “options” edit control where I am adding “-threads 4 -d”

https://duplicacy.com/img/duplicacy_web_restore_start.png

Even when I run the restore command from Safari I am getting the same “CLI: Incorrect Usage” error. If I remove the “-d”, the operation did start. So, it indeed seems like an issue with usage itself.

2023/01/14 22:21:48 127.0.0.1:61592 POST /start_restore
2023/01/14 22:21:48 Created log file /Users/hiavi/.duplicacy-web/logs/restore-20230114-222148.log
2023/01/14 22:21:48 Created restore session s3348x
2023/01/14 22:21:48 Running /Users/hiavi/.duplicacy-web/bin/duplicacy_osx_x64_3.1.0 [-log restore -r 8 -storage Avi-Seagate6TB-DuplicacyStore -overwrite -stats -threads 4 -d --]
2023/01/14 22:21:48 Set current working directory to /Users/hiavi/.duplicacy-web/repositories/localhost/restore
2023/01/14 22:21:48 CLI: Incorrect Usage.
2023/01/14 22:21:48 CLI: 
2023/01/14 22:21:48 CLI: NAME:
2023/01/14 22:21:48 CLI:    duplicacy restore - Restore the repository to a previously saved snapshot
2023/01/14 22:21:48 CLI: 
2023/01/14 22:21:48 CLI: USAGE:
2023/01/14 22:21:48 CLI:    duplicacy restore [command options] [--] [pattern] ...
2023/01/14 22:21:48 CLI: 
2023/01/14 22:21:48 CLI: OPTIONS:
2023/01/14 22:21:48 CLI:    -r <revision>				the revision number of the snapshot (required)
2023/01/14 22:21:48 CLI:    -hash 					detect file differences by hash (rather than size and timestamp)
2023/01/14 22:21:48 CLI:    -overwrite 					overwrite existing files in the repository
2023/01/14 22:21:48 CLI:    -delete 					delete files not in the snapshot
2023/01/14 22:21:48 CLI:    -ignore-owner 				do not set the original uid/gid on restored files
2023/01/14 22:21:48 CLI:    -stats 					show statistics during and after restore
2023/01/14 22:21:48 CLI:    -threads <n>					number of downloading threads
2023/01/14 22:21:48 CLI:    -limit-rate <kB/s>				the maximum download rate (in kilobytes/sec)
2023/01/14 22:21:48 CLI:    -storage <storage name> 			restore from the specified storage instead of the default one
2023/01/14 22:21:48 CLI:    -key <private key> 				the RSA private key to decrypt file chunks
2023/01/14 22:21:48 CLI:    -persist 					continue processing despite chunk errors or existing files (without -overwrite), reporting any affected files
2023/01/14 22:21:48 CLI:    -key-passphrase <private key passphrase> 	the passphrase to decrypt the RSA private key
2023/01/14 22:21:48 CLI:    
2023/01/14 22:21:48 The CLI executable returned an error: exit status 2, exit code: 2
2023/01/14 22:21:48 Failed to restore files for backup AAviMasterDataStore revision 8 in the storage Avi-Seagate6TB-DuplicacyStore: exit status 2
2023/01/14 22:21:48 closing log file restore-20230114-222148.log
2023/01/14 22:22:08 Deleted restore session s3348x

The restore operation (without the -d option) running on Safari is in progress and I have my fingers crossed. I have a few more restore operations to be done and will see if using Safari is the silver bullet.

If you want to use global options in the web UI, you need to use pipe symbol:

-d | -threads 4

1 Like

TIL🤯. But why? Why differentiate options at all?! Argument is argument. 🤷

I agree with @saspus.

The restore UX has 5 user input fields - mainly because they are distinctly different parameters. If “options” and “global options” are inherently different, then we should just have a second edit control. Else, the experience should be same and not have hacky workarounds like pipes etc.

Anyway - @gchen - would like your input on why I might be seeing browser timeouts when using Edge (chrome based) browser.

  • If stability of the browser is the issue, may be it might be helpful to users to have it in big and bold letters to use only use Safari and other browsers are not supported (will save time and headaches to people).

@hiavi are you running the latest version? Since version 1.5.3 the restore operation can remain running in the background after your close the restore page.

I am on Duplicacy Web Edition 1.5.0.

OS Version: Mac Ventura 13.1
Browser: Edge Version 109.0.1518.49 (Official build) (arm64)
Dashboard Page is showing : Duplicacy Web Edition 1.5.0
Settings Page is showing: Command Line Current Version 3.1.0

It would be good to have a mechanism for Web App to also update automatically on startup - looks like Duplicacy only has such a setting for underlying CLI.

What is the suggested way to manually upgrading [on Mac] to ensure not lose existing configurations?

It would be good for the guide to have some instructions on upgrade (Mac please).

I am worried about experiences like Duplicacy Web Edition 1.6.3 releases - #2 by cooltony not too long back.