High level steps to backup FileCloud in Linux:
- Stop webserver
- Backup configuration files
- Backup database.
- Backup user files.
- Start webserver
Stop Webserver and MongoDB
Before backup is performed, stop the apache webserver and mongodb. This prevents any client from adding/removing files while the backup is in progress.
Stopping services
TEXT
# sudo /etc/init.d/apache2 stop
# sudo /etc/init.d/mongodb stop
Please use equivalent commands applicable for your OS distro.
Backup FileCloud installation
Once the apache server is stopped, make a copy of entire cloud installation. The cloud installation is typically under /var/www/ directory.
Backing up FileCloud installation
TEXT
# mkdir -p /filecloudbackup/www
# sudo cp -dprv /var/www/. /filecloudbackup/www
If your installation uses a different directory, update the above commands accordingly.
Backup database
Once the mongodb is stopped, backup the database files.
Backing up FileCloud database.
TEXT
# mkdir -p /filecloudbackup/db
# sudo cp -dprv /var/lib/mongodb/. /filecloudbackup/db
Check your mongodb installation to make sure /var/lib/mongodb is the correct database path.
Backup user files
To backup user files, make a copy of the entire directory specified for the managed storage settings, in the "Storage Path". This is found in Settings->Storage tab in the FileCloud Admin panel.
Note: In the following case, the entire "/opt/filecloud/data" directory has to be backed up.
Use the following commands, to backup user files.
Backing up user data files
TEXT
# mkdir -p /filecloudbackup/userdata
# sudo cp -dprv /opt/filecloud/data/. /filecloudbackup/userdata
Start Webserver and MongoDB
After the above backup steps are performed, start the apache webserver and mongo db processes.
Starting services
TEXT
# sudo /etc/init.d/mongodb start
# sudo /etc/init.d/apache2 start
Please use equivalent commands applicable for your OS distro.