The csrestore utility restores the calendar database, a specified calendar, or a user’s default calendar that was saved using csbackup or csexport. Commands are:
database restores the calendar database.
calendar restores a specified calendar.
defcal restores a user’s default calendar.
version displays the version number of the utility currently installed.
The caldb.conf version file located in the specified backup directory shows the version number of the database that was backed up.
The Calendar Server version 6.3 csrestore utility is not compatible with the Calendar Server version 2 csrestoreutility. Do not try to restore data that was backed up using the csrestore in version 2 because data loss can occur.
You must run the utility locally on the machine where Calendar Server is installed.
If you are restoring the calendar database, Calendar Server must be stopped.
You must be logged in as the user and group under which Calendar Server is running (such as icsuser and icsgroup) that was specified during installation, or as root.
csrestore does not take care about the user LDAP entries, subscribed or own calendar. You need to manually perform on the User LDAP entire to get the personal calendar back on the multi valued attribute, icsSubscribed.
csrestore [-v|-q] [-f] database inputdir csrestore [-v|-q] -c calid calendar inputfile csrestore [-v|-q] -a userid [-b basedn] defcal inputfile |
The following table describes the commands available for the csrestore utility.
Table D–28 csrestore Utility Commands
The following table describes the csrestore utility command options.
Table D–29 csrestore Utility Command Options
Option |
Description |
---|---|
-v |
Run in verbose mode: Display all available information about the command being performed. Default is off. |
-q |
Run in quiet mode:
|
-a userid |
The user ID to restore. This option is required with the default option. There is no default. |
-b basedn |
The LDAP base DN (distinguished name) to be used for the specified user ID. The default is taken from the setting local.ugldapbasedn defined in the ics.conf file. |
-f |
To force any existing database files to be deleted. |
-c calid |
The calendar ID to restore. This option is required with the calendar command. There is no default. For more information, see 15.2 Creating Calendar Unique Identifiers (calid's). |
Restore the calendar database stored in the directory backupdir that was previously saved using csbackup:
csrestore database backupdir
Restore the calendar with the calendar ID tchang from the file tchang.ics located in the directory backupdir that was previously saved in iCalendar (text/calendar file) format using csbackup or csexport:
csrestore -c tchang calendar backupdir/tchang.ics
Restore tchang from the calendar database in backupdir that was previously saved using csbackup:
csrestore -c tchang calendar backupdir
Restore the default calendar owned by tchang from the file tchang.ics located in the directory backupdir that was previously saved in iCalendar (text/calendar file) format using csbackup or csexport:
csrestore -a tchang defcal backupdir/tchang.ics