Back up database
You will need a backup of your production database to create a test website, to update Creatio, as well as to roll back the changes in case of problems, for example, compatibility with customizations.
If you deploy a backup of the production database and you want to disable your integrations in it, run the Disable_Synchronization.sql script. Download the script.
Back up Microsoft SQL Server database
-
Run Microsoft SQL Server Management Studio.
-
Select the Back Up command under the Tasks section in the context menu of the application database catalog.
-
Specify the name of the database copy and the directory to create backup. Click OK to start the backup process (Fig. 1).
noteMake sure the directory for the database backup already exists. The SQL server has no rights to create directories.
When updating the Creatio production version, we recommend creating a copy of the application using any file manager.
To open a database backup:
- Log in to Microsoft SQL Studio.
- Create a new database if you need to extract only certain data from the backup, or select an existing database if you need to restore all data.
- Select the Restore database command in the context menu of the database. This opens a window.
- Specify the path to the backup file.
- Click OK and wait for the restoration process to complete.
Learn more about deploying the backup database: Deploy Microsoft SQL Database for Creatio.
Back up Oracle Database
-
Connect to the Oracle server using the SqlPlus utility:
sqlplus "SYS/SYS_PASSWORD@ORACLE_HOST:ORACLE_PORT/SERVICE_NAME AS SYSDBA"
where:
SYS_PASSWORD
: a password for authorization on the Oracle server.ORACLE_HOST
: Oracle server address.ORACLE_PORT
: Oracle server port.SERVICE_NAME
: Oracle service name.
-
Execute the following SqlPlus commands:
CREATE OR REPLACE DIRECTORY DIRECTORY_ALIAS AS 'PATH_TO_BACKUP_DIRECTORY';
GRANT READ, WRITE ON DIRECTORY DIRECTORY_ALIAS to BACKUP_SCHEMA_NAME;
where:
DIRECTORY_ALIAS
: an alias for the directory where the backup copy will be placed.PATH_TO_BACKUP_DIRECTORY
: full path to the directory where the backup copy will be placed.BACKUP_SCHEMA_NAME
: name of the schema for which the backup is made.
-
Back up your schema using the expdp utility:
expdp "BACKUP_SCHEMA_NAME/BACKUP_SCHEMA_PASSWORD@//ORACLE_HOST:ORACLE_PORT/SERVICE_NAME" SCHEMAS=BACKUP_SCHEMA_NAME DIRECTORY=DIRECTORY_ALIAS dumpfile=BACKUP_FILE_NAME NOLOGFILE=YES
where:
ORACLE_HOST
– Oracle server address.ORACLE_PORT
– Oracle server port.SERVICE_NAME
– Oracle service name.DIRECTORY_ALIAS
– an alias for the directory where the backup copy will be placed.BACKUP_SCHEMA_NAME
– name of the schema for which the backup is made.BACKUP_SCHEMA_PASSWORD
– password for the schema for which the backup is made.BACKUP_FILE_NAME
– name of the file where the schema will be exported.
As a result, the expdp utility will create a backup copy of the BACKUP_SCHEMANAME
schema that has the BACKUP_FILE_NAME in the PATH_TO_BACKUP_DIRECTORY
directory.
Learn more about deploying the backup database: Deploy Oracle Database for Creatio.
Back up PostgreSQL database
To create a database backup, use the pg_dump
utility. It is located in the software setup folder for PostgreSQL.
-
Enter the data base connection password in the environment variable:
- Windows
- Linux
set PGPASSWORD=#SysUserPassword#
export PGPASSWORD=#SysUserPassword#
-
Run the following command:
"C:\\PostgreSQL\\pg_dump.exe" --host=#ServerIP# --port #ServerPort# --username #SysUserName# --format=c --blobs --verbose -clean -file=#BackupFilePath# #DatabaseName#
where
ServerIP
– PostgreSQL server address.ServerPort
– PostgreSQL server port.SysUserName
– name of the PostgreSQL system user (you specify it when installing the PostgreSQL server).SysUserPassword
– password of the PostgreSQL system user (you specify it when installing the PostgreSQL server).BackupFilePath
– full path to the directory where the backup copy will be placed.DatabaseName
– name of the data base, whose backup to make.
As a result, the utility will create a database backup in the BackupFilePath
directory.
Learn more about deploying the backup database: Deploy PostgreSQL Database (Linux) and Deploy PostgreSQL Database (Windows).