Corrupt duplicacy.json file

Hi, My Duplicacy Web recently stopped working. I found that it was because the duplicacy.json file was blank. Don’t know how that happened, but I was able to get Duplicacy running again by renaming the json file and allowing it to create a new one, but obviously the storage settings need to be setup again.

Is there a way to restore the config settings in duplicacy.json? I don’t have a backup of the json file, but i’m beginning to think that might be a good idea going forward.

I’m using Windows 10

1 Like

Did you see any file like duplicacy.json.123456 under the same directory? When modifying duplicacy.json the Web GUI always writes to such a temporary file first and then rename it. If there is such a file you can just manually rename it to duplicacy.json.

I didn’t find any other duplicacy.json files in the directory. Not sure what happened but i will just recreate the config/jobs. Thanks

Same thing just happened to me. Fresh Windows 10, fairly new installation of duplicacy-web because I am in the process of moving to a new laptop. duplicacy.json appears blank but has a file size of 20 KB, which is about right. The log file has the following entries. The job is scheduled to run every 15 minutes. The one at 11:29 completed successfully, but the one at 12:20 failed and shut down the service. There is no duplicacy.json.xxx in the folder. It is possible that something other than duplicacy destroyed the config file between runs. I’ll restore a slightly stale backup and fix it manually. Would be good to automatically create a copy of this file in the same folder, and perhaps prompt the user on setup or modification to save a copy in a safe place.

2021/08/04 11:29:05 Schedule Continuous Backup next run time: 2021-0804 11:43
2021/08/04 12:20:10 Failed to parse the configuration file: invalid character ‘\x00’ looking for beginning of value
2021/08/04 12:20:16 All schedules paused
2021/08/04 12:20:16 Duplicacy Web Edition service exited
2021/08/04 12:20:46 Failed to parse the configuration file: invalid character ‘\x00’ looking for beginning of value
2021/08/04 20:21:05 All schedules paused
2021/08/04 20:21:05 Duplicacy Web Edition service exited

I did an octal dump of the file. It was all zeros.