> Source: [sk133312](https://support.checkpoint.com/results/sk/sk133312)

# sk133312 - How to run a 'migrate export' or 'migrate import' command that survives a closed/timed-out SSH session

| Property | Value |
|----------|-------|
| Solution ID | sk133312 |
| Date Created | 2018-07-31 |
| Last Modified | 2022-12-28 |
| Technical Level | General |
| Products | Security Management Server, Endpoint Security |
| Versions | R81.20, R81.10 (EOS), R81 (EOS), R81.20, R81.10 (EOS), R81 (EOS) |
| OS | Gaia |
| Platform | Intel/PC, Smart-1, VMWare ESX |

## Solution

### **Abstract**

When you run a '*migrate export* ' or '*migrate import*' command, the command is tied to the current CLI session. When the current CLI session ends (the SSH connection times out, or is closed), the 'migrate' process is halted/canceled.

This can also happen when the exported management database is very large (30GB or more): for example, the export of a management database of 30GB can take 3 to 4 hours to complete. This means that the CLI session (SSH session) must stay active for 3 to 4 hours.

### **Solution**

To make sure the '*migrate export*' command survives these scenarios and continues to run successfully in the background, run the command with the following syntax:

*\[Expert@MGMT:0\]# cd $FWDIR/bin/upgrade_tools/*   
*\[Expert@MGMT:0\]# yes \| nohup ./migrate export \[options\] /\<full path\>/\<name of exported file without any extension\>*

To make sure the '*migrate import*' command survives these scenarios and continues to run successfully in the background, run it with the following syntax:

*\[Expert@MGMT:0\]# cd $FWDIR/bin/upgrade_tools/*   
*\[Expert@MGMT:0\]# yes \| nohup ./migrate import \[options\] /\<full path\>/\<name of exported file\>.tgz*

### **Notes**

* To see the built-in help, run: *./migrate -h*
* Refer to <https://linux.die.net/man/1/bash> for a description of the pipeline,
* Refer to <https://linux.die.net/man/1/nohup>.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
