When running in a production environment, a proper backup will ensure that the Portal system can be restored to full functionality after a hardware or software failure as quickly as possible. Exactly how to set up the backup will differ from installation to installation but this chapter will detail which parts of the system should be backed up.
The configuration files and license keys for Portal are stored in /etc/cantemo/portal and should be backed up if you have made changes from the default configuration, as certain changes may go hand in hand with changes to the databases or thumbnails.
The best way to recreate the software binaries is to reinstall using the original installation package. This will ensure that all files will be installed in the correct places and have the correct file system permissions. The following is a list of all file system locations uses by the system, including their uses.
Portal configuration files
Default media directory
Default thumbnail directory
Portal uses the postgresql database, for details please refer to the postgresql documentation.
This section describes most basic method of taking backups of Postgresql. This backup procedure can however take quite a lot of time. If you have a large database you may want to investigate other methods of backups. For this, we refer to the Postgresql documentation at https://www.postgresql.org/docs/10/backup.html
There are three databases which should be backed up, “portal”, “activiti” and “vidispine”. Both contain essential information for the running of the Portal system.
When backing up and restoring the database you can backup using the “pg_dump” or “pg_dump_all” commands.
The database backup can be created like this:
sudo -u postgres /usr/pgsql-10/bin/pg_dumpall > fullbackup.pgdump
If you want to restore a previously backup up database and delete the current database invoke the following:
sudo -u postgres dropdb portal
sudo -u postgres dropdb vidispine
sudo -u postgres dropdb activiti
sudo -u postgres psql -f fullbackup.pgdump postgres
The above procedure will delete your current database, also it will only restore the database and leaving all mediafiles “as is”
The default storage is /srv/media1 but if you configure other storage areas you should ensure these are protected properly in case of system failure.
Portal stores thumbnails and poster images in an on-disk database per item which by default is stored in /srv/thumbnail. If the system was originally installed with Portal 3.4 or later this directory contains one two levels of subdirectories, with 1000 items each. If the system was originally installed with Portal 3.3 or earlier, this directory contains one subdirectory per item. These files can be recreated from the original media but these files should be backed up to allow for a speedy recovery.
The search engine Solr which is used by Portal stores its search indexes in the filesystem. These files can be backed up together with the database to allow for a quicker system restoration. If these files are not backed up, a full reindex of all items will have to be performed on restoration to restore search functionality in Portal.