FileCloud Backup and Restore - Linux Manual

FileCloud can be backed up and restored on Linux following these manual steps.

While performing the backup/restore, these are the important file categories that should be backed up/restored:

  • cloud cloud files.
  • cloud database.
  • cloud user files.

High level steps to backup FileCloud in windows:

  1. Stop webserver
  2. Backup configuration files
  3. Backup database.
  4. Backup user files.
  5. 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
# 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
# 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.
# 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
# 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
# sudo /etc/init.d/mongodb start
# sudo /etc/init.d/apache2 start

Please use equivalent commands applicable for your OS distro.

High level steps to restore FileCloud in windows:

  1. Stop webserver
  2. Restore configuration files
  3. Restore database.
  4. Restore user files.
  5. Start webserver

Stop Webserver and MongoDB

Before restore is performed, stop the apache webserver and mongodb. This prevents any client from adding/removing files while the backup is in progress.

Stopping services
# sudo /etc/init.d/apache2 stop
# sudo /etc/init.d/mongodb stop 

Please use equivalent commands applicable for your OS distro.

Restore FileCloud installation

Restore the FileCloud installation files using the following command.

Note: Check your apache installation to ensure /var/www/ is the document root directory.

Restoring FileCloud installation
# sudo cp -dprv /filecloudbackup/www/. /var/www/

Restore database

Restore the database using the following command.

Note: Check your mongodb installation to ensure /var/lib/mongodb is the database path.

Restoring FileCloud installation
# sudo cp -dprv /filecloudbackup/db/. /var/lib/mongodb/

Restore user files

To restore user files, restore the user files to the directory specified and then make sure that path is set correctly in Managed Storage Settings in "Storage Path".

Note: In the following case, the entire "/opt/filecloud/data" directory has to be restored.

Use the following commands, to restore user files.

Backing up user data files
# sudo cp -dprv /filecloudbackup/userdata/. /opt/filecloud/data

Check your mongodb installation to make sure /var/lib/mongodb is the correct database path.

Start Webserver and MongoDB

After the above restore steps are performed, start the apache webserver and mongodb process.

Starting services
# sudo /etc/init.d/mongodb start
# sudo /etc/init.d/apache2 start

Please use equivalent commands applicable for your OS distro.