You should regularly backup backup the Clearspace database and the jiveHome directory, especially before performing a Clearspace upgrade.
Linux with MySQL
If you've created a clearspace user that resides at /usr/local/clearspace, we recommend creating the following directories:
clearspace/ |-- backups/ |-- deployments/ |-- jiveHome
The backups directory will contain backups of the database and jiveHome directory. The deployments directory will contain exploded WAR files of Clearspace deployments (we recommend using a symbolic link to post to the "latest" deployment").
The following shell script (backup_clearspace.sh) would live in the backups directory and backs up the database named "clearspace" using a database user named "clearspace". You must pass in the database password as an argument to the script:
#!/bin/bash if [[ $# -ne 1 ]]; then echo "Usage: $0 <password>" exit 1 fi echo "Backing up Clearspace database..." mysqldump --user=clearspace --password=$1 --max_allowed_packet=512MB clearspace | gzip > clearspace_db_$(date +%m-%d-%Y).dump.sql.gz echo "done backing up Database." echo "Making a copy of jiveHome" cp -R ../jiveHome ./jiveHome_$(date +%m-%d-%Y) echo "done copying jiveHome"