- If the file
%HOME%/Nextcloud/keepass/{DB_NAME}
[^1][^2] does not exist, then it exports the db there to create a new file - If the file
%HOME%/Nextcloud/keepass/{DB_NAME}
[^1][^2] does exist, then it synchronizes the current database with that file
This way you don't have to worry about saving or moving around copies into your synced storage, and the normal sync trigger won't error out on a file that does not exist
The first trigger, Save new if file doesn't exist
turns off the following Sync if file exists
trigger to avoid a loop, the third trigger turns the sync trigger back on so that on any subsequent saves, it sync to the file as well.
[1]: %HOME%
in keepass expands to $HOME
on linux - might expand to %HOME%
on Windows, too.
[2]: {DB_NAME}
in keepass expands to the database's name + extension.