Dsynq basicsΒΆ

The two core commands in Dsynq are dsynq checkout and dsynq checkin.

dsynq checkout
This command downloads the latest changes from the remote, unlocks the local data for editing, and locks the remote data from others.
dsynq checkin
This command uploads the local changes to the remote, locks the local data, and unlocks the remote data for others.

If you want to cancel a checkout without checking in the local changes, use dsynq checkout --cancel. This will undo the checkout both locally and on the remote yet keeps the local changes and locks the local data in its current state. The remote data remains unaffected.

After Initialization, hello-dsynq is at the initial commit. Tag it v0.1 to be able to address it by tag rather than by commit ID.

> git tag v0.1

Normally, you don't tag every commit. It's simply a matter of convenience for this tutorial.

Below is a minimal example of how dsynq checkout and dsynq checkin work together.

> dsynq checkout
receiving incremental file list
data/
No remote data for 07a93783bc28f788ede49ab98e206ba372baeec7. Creating an empty one...

Checkout done

Data for 07a93783bc28f788ede49ab98e206ba372baeec7 checked out
When finished, don't forget to check in the data to unlock it for others
> echo big data file v0.1> data/big.dat
> dsynq checkin
sending incremental file list
data/
data/big.dat

             19 100%    0.00kB/s    0:00:00
             19 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/2)
sending incremental file list
.databases/

Compressing database delta(s)...
No databases found
Database delta(s) compressed

Data checked in successfully!

Before checking in the data, Dsynq looks for changes in the database data and compresses them as configured. Tracking databases shows how to add project's databases to the Dsynq configuration.

Using dsynq checkin does not have to be one-to-one with git commit. You can have more than one checkout-checkin cycle for any commit. Also it's possible to have a commit in which the data don't change at all and are used as is from the preceding commit.

To find out whether the data is checked out or not, use dsynq status.

> dsynq status
Dsynq parameters:
     url: ssh://dsynq@example.com:.dsynq_tutorials
     backup_dir: .backups

Checkout status local:
     Checkout done: False

Checkout status remote:
     Checkout done: False

Remote data status:
     Local data is up-to-date with remote data