This document describes the important steps for taking backups regularly in order to restore everything in case a censhare failure occurs.

1. censhare, assets file systems, and cdb backup

Some important things which should be taken care of during these backups.

Switch to corpus user to take a backup:

(A)  About Assets:

Take the backup of “assets” directory which is present by default in “/opt/corpus/work/”. It is always configured in “censhare-Admin - Configuration - Services - Filesystems” and can differ from “~/work/assets” and there can be also more than just this one filesystem. So better state that all configured asset file systems configured for that server should be backed up.

(B) About CDB:

CDB that as long as it is small, censhare can easily rebuild it. But depending on the size of the data, such a rebuild could take very long and in order to have a quicker restore and re-availability of the system, it could be backed up. The CDB can be inconsistent if at the moment of writing data to disk it gets a backup. Therefore a backup of the CDB has to be crash consistent. Writes to disk are run by the system every 10 minutes and can also be triggered with `bin/AdminClient.sh -b write-checkpoint`.

After executing the command i.e. `bin/AdminClient.sh -b write-checkpoint` there will be similar output as below in “/opt/corpus/work/logs/server-0.0.log”.

2018.03.13-08:35:37.704 INFO   : RMI TCP Connection(24249)-10.130.3.229: CommandExecutor: master.20180313.083537.689[system]: admin.cachedb.checkpoint execute
CODE

After successful execution of the command, there will be an output similar to the one below in “/opt/corpus/work/logs/server-0.0.log”.

2018.03.13-08:35:37.739 INFO   : AssetStoreUpdater: AssetStoreService: master.AssetStoreUpdater: 6 Transactions done, checkpoint finished in 17ms.
CODE

2. Oracle or PostgreSQL DB schema backup

Some important points which should be taken care of during the DB backup.

The database (Oracle or PostgreSQL) schema information is in the configuration file which is available in the file “/opt/corpus/cscs/app/services/database/config.xml”. It is always configured in “censhare-Admin - Configuration - Services - Database”.

How to take Oracle or PostgreSQL DB schema backups?

About Oracle Backup:

On a daily basis, there should be taken a backup of “ < DB schema mostly corpus >” and it can be done either EXPDP or RMAN(Full & Incremental backup) or using any other backup methodology.

"expdp" command is as below and should be run this command by Oracle user:

expdp corpus/corpus flashback_scn=$(echo -e “select current_scn from v\$database;” | sqlplus / as sysdba 2>/dev/null| grep [0-9][0-9][0-9][0-9][0-9][0-9]) dumpfile=corpus.`hostname`-`date +%Y.%m.%d`.dmp logfile=corpus.`hostname`-`date +%Y.%m.%d`-export.log directory=data_pump_dir
CODE

OR either use "RMAN" to take a backup.

About PostgreSQL Backup:

If the database is PostgreSQL then there should be taken a backup of “corpus” schema either “pg_dump” or “pg_backrest” backup tool (Full and incremental) or any other backup methodology.

"pg_dump" command is as below and run this command by “postgres” user to take the “corpus” schema backup:

pg_dump -U corpus -j4 -v -Fd -f /var/lib/pgsql/corpus_$(date '+%Y-%m-%d_%H%M%S').dir   corpus  >& /var/lib/pgsql/corpus_$(date '+%Y-%m-%d_%H%M%S').log
CODE

3. censhare-Custom backup

There should be taken a backup of “censhare-Custom” directory and the path of this directory as below:

“/opt/corpus/censhare/censhare-Custom/”
CODE

It is not necessary to have the backup of “censhare-Custom” from all application server and can be taken from the master server.

4. censhare Render-Client backup

It’s running on Windows or MAC server only and should be taken the backup of “joboptions”, “color profiles” and “font”.

First: “joboptions” location path is as below and there should be taken a backup of this folder.

On Windows Server path is:

C:\Users\<user>\AppData\Roaming\Adobe\Adobe PDF\Settings\
CODE

If “InDesign Server” is running under user SYSTEM or the “joboptions” are defined with square brackets:

InDesignServers up to version CS6 use:

C:\ProgramData\Adobe\Adobe PDF\Settings\
CODE

and InDesignServers since version CC use:


C:\Program Files\Adobe\<Adobe InDesign CC Server name>\Resources\Adobe PDF\settings\mul\
CODE

Japanese installed servers since version CC using this different folder:

C:\Program Files\Adobe\<Adobe InDesign CC Server name>\Resources\Adobe PDF\settings\japan\
CODE

On MAC Server path is:

/Users/<user>/Library/Application\ Support/Adobe/Adobe\ PDF/Settings/
CODE

Second: “Color profiles” for Render-client location path is as below and should be taken a backup of this folder.

On Windows Server path is:

C:\Users\<user>\AppData\Local\Adobe\Color\Profiles\Recommended\
CODE

If InDesign Server is running under user SYSTEM then the path is

C:\Program Files (x86)\Common Files\Adobe\Color\Profiles\Recommended\
CODE

On MAC Server path is:

/Users/<user>/Library/Application\ Support/Adobe/Color/Profiles/Recommended/
CODE

Third: “Font” location path is as below and should be taken a backup of this folder.

On Windows Server path is:

For InDesignServer CS4, CS5 and CS5.5 censhare operates InDesignServer in 32bit mode, then path is:

C:\Program Files (x86)\Adobe\Adobe InDesign CS4 Server\Fonts\
C:\Program Files (x86)\Adobe\Adobe InDesign CS5 Server\Fonts\
C:\Program Files (x86)\Adobe\Adobe InDesign CS5.5 Server\Fonts\
CODE

5. censhare-Service-Client backup

If “Color Profiles” is running for “censhare-Service-Client then there should be taken a backup of below folders.

On Windows Server path is:

C:\Users\<user>\censhare\v4\hosts\<host>\iccprofiles\
CODE

On Mac Server path is:

/Users/<user>/Library/Preferences/censhare/v4/hosts/<host>/iccprofiles/
CODE

On Linux Server path is:

censhare Server

/opt/corpus/cscs/app/services/image/iccprofiles/
CODE

Old Linux Service-Client

/opt/corpus/.censhare/v4/.hosts/<host>/iccprofiles/
CODE

or if newer Linux Service-Client

/opt/corpus/service-client/config/.hosts/<host>/iccprofiles/
CODE

Please note: You want the state of the Assets and Database from the exact time, but it’s not critical if there is a gap between, but you may encounter missing files if the database is newer then the Assets, but can at least then use an older version inside of censhare for that asset. And the CDB should be older, then the Database, as it can rebuild the gap

There should be taken the backup in below sequence:

CDB —> Asset —> Database
CODE

Recommendations: It is the best practice to have always a complete backup of all of your systems, so in case of a restore you do not need to handle any re-installations and for censhare Software and everything that relates to it, will be installed by default at this path “/opt/corpus”.