Skip to content

04 Administration

Shubhra Prakash Nandi edited this page Feb 26, 2026 · 21 revisions

Managing sync database

The utility (syncdb.php) to manage the sync database is present in the directory src/App. If using SQLite as your sync database product execute this utility as a user who has write permissions on the database file.

WARNING: DO NOT manipulate any data in the sync database directly. Always use the above utility to make changes.

Initialization

The sync database must be initialized before using this application. Make sure your address books are configured correctly in the conf file before you execute the below to initialize the sync database.

php syncdb.php init

Managing address books

If you want to list / add / rename / delete an address book, execute the below and follow the prompts.

php syncdb.php

This application will not process any address book which is not present in the conf file and in the sync database simultaneously.

Also the following parameters of an address book in the conf file must match the values in the sync database. If you change these values in the conf file, use the utility above to delete the address book and add it back to the sync database.

user_specific
writable

Managing users

If you want to delete a user, execute the below and follow the prompts.

php syncdb.php

Housekeeping

To purge logically deleted records execute the below.

php syncdb.php housekeeping

You need to execute the above only occasionally when you want to reclaim space used by logically deleted records. You may have to follow this up with database specific operation like VACUUM FULL, REBUILD or OPTIMIZE on the following tables to actually achieve the same.

cards_user
cards_backend_map

Tuning

Adjusting max size of processed contact

If you get HTTP status code 413 when trying to add/update a contact check max_size address book configuration key in conf/conf.php.example file and update it in the conf file appropriately.

Clone this wiki locally