Manage mediastore synchronizations
mmsyncclient [-e] <mmsync_dev> <command> [<command args>]
The following is an example of typical output produced when the -e option is enabled:
Event listen mode, Ctrl + C to exit. MMSYNC_EVENT_MS_SYNC_STARTED(operation ID 3) MMSYNC_EVENT_MS_SYNC_FIRST_EXISTING_FID(1, operation ID 3) MMSYNC_EVENT_MS_1PASSCOMPLETE(operation ID 3) MMSYNC_EVENT_MS_2PASSCOMPLETE(operation ID 3) MMSYNC_EVENT_MS_3PASSCOMPLETE(operation ID 3) MMSYNC_EVENT_MS_SYNCCOMPLETE(operation ID 3)
The following synchronization commands are supported:
The mmsyncclient utility allows you to perform synchronizations and monitor their progress through the command line. When you start a synchronization, mmsyncclient displays an operation ID (op_id), which you can use to pause, resume, or cancel the synchronization or to check its progress at a later time. With the sync_debug_set command, you can control how much activity and debugging information is logged, which is useful for troubleshooting.
Start a synchronization of the media content within the specified path on the mediastore that is accessible at the specified mountpoint. The media content is synchronized to the database identified by the device path.
mmsyncclient [-e] <mmsync_dev> sync_start <db> <mountpoint> <syncpath> <options> [<extended_options>]
This command accepts the following parameters:
Key | Value | Description |
---|---|---|
use_synchronizer | mss name (a text string, with quotes, naming a supported synchronizer; for example, "dvdaudio") | Use the requested synchronizer unless it doesn't support the current operation |
force_synchronizer | mss name (a text string, with quotes, naming a supported synchronizer; for example, "dvdvideo") | Force the use of the requested synchronizer, whether or not it supports the current operation |
Suspend a synchronization.
mmsyncclient [-e] <mmsync_dev> sync_suspend <op_id> [flags]
This command accepts the following parameters:
Resume a suspended synchronization.
mmsyncclient [-e] <mmsync_dev> sync_resume <op_id> [flags]
This command accepts the following parameters:
Cancel a synchronization.
mmsyncclient [-e] <mmsync_dev> sync_cancel <op_id> [flags]
This command accepts the following parameters:
Get the status of a synchronization, based on the operation ID.
mmsyncclient [-e] <mmsync_dev> sync_status_get_byid <op_id> [flags]
This command accepts the following parameters:
Get the status of a synchronization, based on the database name.
mmsyncclient [-e] <mmsync_dev> sync_status_get_bydbname <db_name> [flags]
This command accepts the following parameters:
Get the status of all current synchronizations.
mmsyncclient [-e] <mmsync_dev> sync_status_get
This command has no parameters.
Get the name of the database being used in a specific synchronization.
mmsyncclient [-e] <mmsync_dev> sync_status_get_dbname <op_id> [flags]
This command accepts the following parameters:
Set the logging verbosity and debugging levels.
mmsyncclient [-e] <mmsync_dev> sync_debug_set <verbose> <debug>
This command accepts the following parameters:
Send commands to a synchronization in progress.
mmsyncclient [-e] <mmsync_dev> sync_control <op_id> <extended_options> [flags]
This command accepts the following parameters:
Key | Value | Description |
---|---|---|
action | Currently, only one action is supported: priority_folder_set | The action to perform on the synchronization |
folderID | The folderID of the mediastore folder to perform the action on | Used for actions requiring a folderID, such as priority_folder_set |
Action | Description |
---|---|
priority_folder_set | Initiates a priority folder synchronization. Requires the folderID key/value pair. |
With the sync_start command, when the synchronization starts successfully, mmsyncclient returns a text string with the operation ID, which allows you to monitor and control the synchronization in follow-up commands. When the synchronization does not start successfully, a text string with a failure message and a return code of -1 is returned.
All other commands return at a minimum a text string with the return code (rc) and error number (errno). A return code of 0 means the operation completed successfully and is accompanied by an error number of 0. A nonzero return code (typically, -1) means an error occurred. See errno for which error it was and sloginfo for details about the error.
The commands that get synchronization status will return information on the progress of one or many synchronizations, when those commands complete successfully. With the sync_status_get_byid and sync_status_get_bydbname commands, mmsyncclient returns a text string with the following information:
When either of these two commands fails, mmsyncclient returns a text string with the operation ID or database name for the synchronization whose status could not be attained, along with an error string and number. If you provide an operation ID or a database name that doesn't refer to any active synchronization, the standard message containing the return code and error number is returned, with both fields set to 0 because no error actually occurred.
The sync_status_get command produces similar output except that when successful, the status of not just one but all active synchronizations is displayed, and the return code is the number of synchronizations in progress or pending. If this command fails, the return code and error number are returned, with rc being nonzero and errno set based on the error that occurred.
With sync_status_get_dbname, if the operation ID refers to an active synchronization, mmsyncclient returns a text string naming the database being used in the specified synchronization. Otherwise, the standard message containing the return code and error number is returned. If there's no active synchronization with the given operation ID, the return code is 0, because no error actually occurred. If the command fails, the return code is nonzero and errno is set based on the error that occurred.