Repository not initialized?


I’ve opened a dos prompt and did this:

SET TOOL_DIR=D:\Tools\@Command Line Tools\duplicacy_x64
SET TOOL_EXE=%TOOL_DIR%\duplicacy.exe
SET PREF_DIR=%TOOL_DIR%\!preferences
SET EXCLUDES=%TOOL_DIR%\exclusions.txt

SET ID=Tools
SET SRC=D:\Tools
SET DST=E:\duplicacy_tst_tools

"%TOOL_EXE%" init -c 16M -min 4M -max 64M -pref-dir "%PREF_DIR%\%ID%" -repository "%SRC%" "%ID%" "%DST%"
"%TOOL_EXE%" set -filters "%EXCLUDES%"
"%TOOL_EXE%" backup

Everthing went smoothly.

I closed that dos prompt window and opened a new one.
I’ve used the same SET … commands (but no init or -set this time) and after that

"%TOOL_EXE%" backup

But now I get a

Repository has not been initialized

How to I tell duplicacy to pickup the right preferences file so that it doesn’t fail?

Is there no other way then CD’ing into the %TOOL_DIR% folder before executing the backup?

Yes, you should cd to the directory to the place where you initialised it, because the .duplicacy file/directory is created in there.

Using the -pref-dir flag doesn’t entirely move the preferences directory to where you want it. It creates a .duplicacy file (instead of a directory) which contains the path to the actually directory elsewhere.

So combining -repository and -pref-dir is kinda pointless and you should probably stick with -repository.

Ok, thanks @Droolio!