migrate

Important - This command is used to migrate the management database from R80.10 and lower versions.

For more information, see the R81 Installation and Upgrade Guide.

Description

Exports the management database and applicable Check Point configuration.

Imports the exported management database and applicable Check Point configuration.

Backing up and restoring in Management High Availability environment:

  • To back up and restore a consistent environment, make sure to collect and restore the backups and snapshots from all servers in the High Availability environment at the same time.

  • Make sure other administrators do not make changes in SmartConsole until the backup operation is completed.

For more information:

Notes:

  • You must run this command from the Expert mode.

  • If it is necessary to back up the current management database, and you do not plan to import it on a Management Server that runs a higher software version, then you can use the built-in command in the $FWDIR/bin/upgrade_tools/ directory.

  • If you plan to import the management database on a Management Server that runs a higher software version, then you must use the migrate utility from the migration tools package created specifically for that higher software version. See the Installation and Upgrade Guide for that higher software version.

  • If this command completes successfully, it creates this log file:

    /var/log/opt/CPshrd-R81/migrate-<YYYY.MM.DD_HH.MM.SS>.log

    For example: /var/log/opt/CPshrd-R81/migrate-2019.06.14_11.03.46.log

  • If this command fails, it creates this log file:

    $CPDIR/log/migrate-<YYYY.MM.DD_HH.MM.SS>.log

    For example: /opt/CPshrd-R81/log/migrate-2019.06.14_11.21.39.log

Syntax

  • To see the built-in help:

    [Expert@MGMT:0]# ./migrate -h

  • To export the management database and configuration:

    [Expert@MGMT:0]# cd $FWDIR/bin/upgrade_tools/

    [Expert@MGMT:0]# yes | nohup ./migrate export [-l | -x] [-n] [--exclude-uepm-postgres-db] [--include-uepm-msi-files] /<Full Path>/<Name of Exported File> &

  • To import the management database and configuration:

    [Expert@MGMT:0]# cd $FWDIR/bin/upgrade_tools/

    [Expert@MGMT:0]# yes | nohup ./migrate import [-l | -x] [-n] [--exclude-uepm-postgres-db] [--include-uepm-msi-files] /<Full Path>/<Name of Exported File>.tgz &

Parameters

Parameter

Description

-h

Shows the built-in help.

yes | nohup ./migrate ... &

This syntax:

  1. Sends the "yes" input to the interactive "migrate" command through the pipeline.

  2. The "nohup" forces the "migrate" command to ignore the hangup signals from the shell.

  3. The "&" forces the command to run in the background.

As a result, when the CLI session closes, the command continues to run in the background.

See:

export

Exports the management database and applicable Check Point configuration.

import

Imports the management database and applicable Check Point configuration that were exported from another Management Server.

-l

Exports and imports the Check Point logs without log indexes in the $FWDIR/log/ directory.

Important:

  • The command can export only closed logs (to which the information is not currently written).

  • If you use this parameter, it can take the command a long time to complete (depends on the number of logs).

-x

Exports and imports the Check Point logs with their log indexes in the $FWDIR/log/ directory.

Important:

  • This parameter only supports Management Servers and Log Servers R80.10 and higher.

  • The command can export only closed logs (to which the information is not currently written).

  • If you use this parameter, it can take the command a long time to complete (depends on the number of logs and indexes).

-n

Runs silently (non-interactive mode) and uses the default options for each setting.

Important:

  • If you export a management database in this mode and the specified name of the exported file matches the name of an existing file, the command overwrites the existing file without prompting.

  • If you import a management database in this mode, the "migrate import" command runs the "cpstop" command automatically.

--exclude-uepm-postgres-db

  • During the export operation, does not back up the PostgreSQL database from the Endpoint Security Management Server.

  • During the import operation, does not restore the PostgreSQL database on the Endpoint Security Management Server.

--include-uepm-msi-files

  • During the export operation, backs up the MSI files from the Endpoint Security Management Server.

  • During the import operation, restores the MSI files on the Endpoint Security Management Server.

/<Full Path>/

Absolute path to the exported database file.

This path must exist.

<Name of Exported File>

  • During the export operation, specifies the name of the output file.

    The command automatically adds the *.tgz extension.

  • During the import operation, specifies the name of the exported file.

    You must manually enter the *.tgz extension in the end.

Example 1 - Export operation succeeded

[Expert@MGMT:0]# cd $FWDIR/bin/upgrade_tools/
[Expert@MGMT:0]# ./migrate export /var/log/Migrate_Export
 
You are required to close all clients to Security Management Server
or execute 'cpstop' before the Export operation begins.
 
Do you want to continue? (y/n) [n]? y
 
 
Copying required files...
Compressing files...
 
The operation completed successfully.
 
Location of archive with exported database: /var/log/Migrate_Export.tgz
 
[Expert@MGMT:0]#
[Expert@MGMT:0]# find / -name migrate-\* -type f
/var/log/opt/CPshrd-R81/migrate-2019.06.14_11.03.46.log
[Expert@MGMT:0]#

Example 2 - Export operation failed

[Expert@MGMT:0]# ./migrate export /var/log/My_Migrate_Export
Execution finished with errors. See log file '/opt/CPshrd-R81/log/migrate-2019.06.14_11.21.39.log' for further details
[Expert@MGMT:0]#