Multiple Databases (Snap DB)

The database directory is specifyied from the command line using -b (local) and -B (remote). Snap DB (snapshot database) does not work on CIFS, NFS, or other shared file systems mounted on Linux; therefore, -B and -b must specify a directory on a file system physically local to the endpoint host.

async creates a private directory (.private-asp) to store the Snap DB and in-progress transfers (before the files get moved to their final location). This produces a .private-asp directory in the sync directory (used for transfer cache) and a .private-asp directory in the -b/-B directory that stores the Snap DB.

Multiple sessions can sync the same directory or specify the same Snap DB directory (-b/-B), so async creates a subdirectory in .private-asp for each session (with the name specified by -N). To allow the session name to be used as a directory name, names can only use standard alphanumeric characters and "_" and "-" characters. This subdirectory is created on both sides, if needed, depending on the direction of the transfer and Snap DB location (see below for details).

Each async session must have a unique name. If multiple sessions sync the same directory or specify the same Snap DB directory (-b/-B), then the session names must be unique. Snap DB records the session name and the sync directories (local and remote). If you initiate a second async session with the same name, using the same sync directory on one end but a different directory on the other end (or both directories are different, but the database location is the same), async will fail.

Example 1: Bi-directional async  

# -N ex1 -b /var/db -B /opt/aspera/var -d /data/users -r root@server:/storage/users -K bidi 

The above command creates the following:

On the local computer (initiator):

On the remote computer (reactor):

Example 2: Uni-directional async

# -N ex2 -b /var/db -B /opt/aspera/var -d /data/users -r root@server:/storage/users -K push

The above command creates the following:

On the local computer (initiator):


On the remote computer (reactor):


/storage/users/ex2 (for transfer cache)

Changing Direction Between Runs

Changing direction between runs is not allowed. async will fail with an error message and you must run it with --reset or provide a new database directory.

Starting up when a snapshot DB is missing

An async session cannot start when only one of the Snap DBs is present. If this is the case, you must either clean the Snap DB or start async with --reset. The Snap DB is located under the regular private directory by default, although its location can also be specified by startup parameters. Behavior with respect to presence of the private directory and Snap DB file are as follows:

On the client:

  1. If the private directory doesn't exist, create it.
  2. If the database directory doesn't exist (meaning the database doesn’t exist), create both, and remember "there was no DB."
  3. If the database file doesn't exist, create it and remember "there was no DB."
  4. Tell the remote whether the DB existed.

On the remote:

  1. Same as client 1, 2, and 3.
  2. Determine if "there was no DB."

If there is a discrepancy (local Snap DB exists, but no remote; or, remote exists but no local), tell the client there is an error. If a subsequent run specifies different DB directories, the above behavior is preserved. In other words, even if a Snap DB exists in the regular private directory or elsewhere, it assumes "there was no DB" if there isn’t a database in the specified directory.

Deleting the snapshot DB during synchronization results in undefined behavior

To recover, stop async, delete the DB on the other side as well, and restart.