.. _backup-import-to-new-environment: Backup and Import to a New Environment -------------------------------------- .. index:: backup;backup add .. index:: backup;backup create .. index:: system;system id The steps below show how to backup and import to a new environment. 1. Export: a. On the source system, create a remote backup location, for example location name ``sftpbackup``: **backup add sftpbackup ** For example: :: backup add sftpbackup sftp://sftpusr:sftpw@172.29.41.107/home/sftp If a directory is specified in the , this will be created during the backup. Backups to sftp require ssh key-based authentication to be set up. Refer to :ref:`SSH_key_management` for further details. Alternatively, enter the password at the prompt, for example: :: $ backup add sftpbackup sftp://sftpusr:sftpw@172.29.41.107/home/sftp No password found. Do you want to use sshkeys? no What is the host ssh password? Location has been added b. Create a local backup: **backup create localbackup** In a multi-node configuration, the database backup will be created on the secondary node with the highest priority. Use **database config** to check the priority. c. List backups to get the date: **backup list** For example: :: $ backup list  localbackup:     URI: file:///backups     Backups:        1 backups have been created - most recently 2020-03-19 08:21  sftpbackup:     URI: sftp://sftpusr:********@172.29.41.107:home/sftp     Backups:        No backups created yet d. Export the local backup to the remote destination created by **backup add **. * The system ID is appended as a directory to the backup ```` destination path. This can be checked locally by running **system id**. * The backup file is called ``_.tar.gz``. Example output: :: platform@VOSS:~$ backup export localbackup sftpbackup 2020-04-02 11:34 This operation could take a while if the backup is sizeable. Do you wish to continue? y Compressing backup files for date 2020-04-02 11:34 Backup files successfully compressed to 202004021134.tar.gz Backup files successfully compressed to /backups/49940d3feaa39a6a9f36cb5ff533202157c3b77a/VOSS_202004021348.tar.gz platform@10.120.1.246's password: platform@10.120.1.246's password: Export successfully created at platform@10.120.1.246:media/49940d3feaa39a6a9f36cb5ff533202157c3b77a/VOSS_202004021348.tar.gz 2. Import: a. From the SFTP server, **scp** the ``VOSS_202004021348.tar.gz`` file to the new box (for example, ``platform@172.29.21.97``). If the file on the SFTP server is in the directory ``/backups/49940d3feaa39a6a9f36cb5ff533202157c3b77a``, change to the directory, then: :: $ ls VOSS_202004021348.tar.gz $ scp VOSS_202004021348.tar.gz platform@172.29.21.97:/opt/platform/admin/home/media/ b. Import the file as a local backup, for example: :: $ backup import localbackup media/VOSS_202004021348.tar.gz c. Get the file timestamp of the imported backup with **backup list** and restore the backup, for example: :: $ backup restore localbackup 2020-04-02 15:41 .. |VOSS-4-UC| replace:: VOSS-4-UC .. |Unified CM| replace:: Unified CM