Backing Up and Restoring Data in Crowd
Using native database backup tools RECOMMENDED
Using Crowd’s backup utility
For regular backups in production, we strongly recommend that you use native database backup tools instead of Crowd’s XML backup service.
Native database backup tools offer a much more consistent and reliable means of storing (and restoring) data while Crowd is active. When Crowd is in use, there’s no guarantee that XML backups will be consistent as the database may be updated during the backup process. Crowd doesn't report any warnings or error messages when an XML backup is generated with inconsistencies.
Before you begin
Perform regular backups
We recommend that you back up your data regularly, especially before any significant configuration changes and before upgrading Crowd. You should also perform regular backups of your database and your Crowd Home directory.
Back up your encryption keys
All passwords to external systems stored in Crowd are encrypted by default. When making backups, you also need to manually back up your encryption keys. Without them, you won't be able to properly restore Crowd.
Keys are stored in
<crowdHome/shared/keys
. Copy this directory to a secure place.When restoring from backup, copy the directory back to
<crowdHome>/shared/
.
Use native database backup tools
Most databases come with built-in backup and restore tools. We strongly recommend these tools to back up your database and Crowd home directory over the built-in Crowd backup utility as they:
ensure the integrity of the database by taking the backup at a single point in time
are much faster and less resource-intensive than Crowd’s XML backup
integrate with existing backup strategies (for example, by allowing one backup run for all database apps)
may allow for incremental backups, saving disk space
avoid character encoding and format issues resulting from Crowd’s use of XML as a backup format
For more information on how to set up periodic database backups, see the documentation for your database. This typically involves a cron job or a Windows scheduled task invoking a command-line tool like mysqldump or pg_dump.
Back up your Crowd data
To schedule daily backups of your Crowd data:
- Log in to the Crowd administration console.
- From the top navigation bar, select Administration > Backup.
- In the Schedule backup panel, select Enable scheduled backups to XML and choose the time.
- Select Submit.
When scheduled backups are enabled, Crowd will create a daily backup in the /backups
directory under your Crowd shared directory. Backup files will be rotated to retain the most recent fifty daily backups.
To manually back up your Crowd data:
- Log in to the Crowd administration console.
- From the top navigation bar, select Administration > Backup.
- In the Manual backup panel, select Reset domain if the backup file will be restored onto a different server. Selecting Reset domain will reset the domain to blank. (After you restore the data, you can change the domain as described in Domain.)
- Enter an appropriate Backup file name. This will be the name of the XML file that Crowd will create. When the backup process has finished, you will find the backup file in the
/backups
directory under your Crowd shared directory. - Select Submit.
Restore your Crowd data
To restore your Crowd data:
- Log in to the Crowd administration console.
- From the top navigation bar, select Administration > Restore.
- In the Restore file path field, type the path to the backup file, including the name of the XML file.
- Select Submit.
Active status and backups
While Crowd allows you to locally set the active status of users in directories without proper active status support (eg. OpenLDAP), those changes will not be stored in the backup XML. When restoring from a backup, all of those users will be subsequently reactivated. Crowd versions 3.4.6, 3.5.1, and 3.6.0 come with the possibility to export connector users to the backup file, allowing you to preserve the active flag status after a restore. This option however will increase the size of the backup file and may require increasing Crowd’s memory limits.
For this feature to work, new backup files must be generated with the “Backup connector directories” option enabled.