State is always optional, and syncs can work without it. You can run every sync in a full refresh mode,
which means state will be ignored. Also, you can not provide state at all.The internal structure of state can be found on Protocol page.
Local files
By default, Syncmaven stores state in bunch of local files in<project-dir>/.state
directory. This is convenient
for local debugging.
To change the default location, you can use --state <dir>
option with sync
command.
However, to preserve state between different machines, the other options should be used.
Postgres
Syncmaven can store state in Postgres database. To enable this, you need to provide a connection string to the database. Provide the connection string using--state postgres://<user>:<password>@<host>:<port>/<database>
option with sync
command.