The csmigrate utility is used to migrate Calendar Server 6.0, 6.1 or 6.2 databases to Calendar Server 6.3 databases. You can find the csmigrate utility in the sbin directory of the Calendar Server product along with other administrative tools.
This section contains the following topics:
The syntax for the csmigrate command is:
csmigrate [-q] [-d] [-l min|max] [-b backup_dir] source_dbdir target_dbdir
The options and their usage are as follows:
Specifies quiet mode and no print instructions.
Specifies dry run mode and no new database written.
Specifies log level. The migration logs are written to csmigrate.log and errors are written to csmigrateError.log in the default logs directory.
Specifies the directory to backup source database. The program backs up the source database to this directory and works on that copy to prevent any damage to the source databases. Default location is the backup under the source database directory.
The directory where pre-migration database files are located.
The directory where post-migration files are created.
To print the version information of the tool.
To print the usage information of the tool.
The exit codes for the program are 255 on failure and 0 on success.
Examples of using the options in csmigrate command are:
csmigrate -b /var/opt/SUNWics5/tmpdb /var/opt/SUNWics5/old_db /var/opt/SUNWics5/new_db csmigrate -q /var/opt/SUNWics5/old_db /var/opt/SUNWics5/new_db csmigrate -l min old_db /var/opt/SUNWics5/new_db csmigrate -l max old_db /var/opt/SUNWics5/new_db
Log in with root privileges.
Stop all services.
For example, issue the following command:
Move your current databases to a temporary directory.
For example, move the entire csdb directory to the oldcsdb.
mv cal-svr-base/SUNWics5/csdb/* cal-svr-base/SUNWics5/oldcsdb
Make sure both the new directory and old files in that directory are owned by the default administrator (icsuser, icsgroup).
If the ownership is not correct, change ownership using the following command:
chown -R icsuser:icsgroup /cal-svr-base/SUNWics5/oldcsdb/
Run the migration tool.
Migrate from your new backup copy (oldcsdb) to the csdb directory as shown in the following example:
cd cal-svr-base/SUNWics5/cal/sbin/ ./csmigrate -l max /cal-svr-base/SUNWics5/oldcsdb cal-svr-base/SUNWics5/csdb
Restart calendar services.
For example, use the following command: