Obtain Backup Files for Yeastar Cloud PBXs

Before starting migration, you need to obtain backup files for Yeastar Cloud PBXs from the YMP server.

Prerequisites

Before you start, ensure that the followings are ready:
  • You have gather the following information for SSH access:
    • Private IP address of the YMP server.
    • SSH ports for both YMP and SBC servers.
    • SSH credentials (username and password) for both YMP and SBC servers.
  • Make sure that the SSH account have root privileges on the YMP server.

Procedure

  1. Access the YMP server via SSH.

    Access to the YMP server requires a two-step SSH connection. You will first connect to the SBC server (acting as a jump host) via YMP domain, then SSH from the SBC server to the YMP server using its private IP address.

    1. On your local computer, launch a terminal window.
    2. Connect to the SBC server using the corresponding SSH credentials.
      #On your local computer
      ssh -p {sbc_ssh_port} {sbc_username}@{your_ymp_domain} 
      For example,
      [C:\~]$ ssh -p 2222 sbcadmin@ymp-demo.example.com
    3. When prompted to enter a password, enter the SSH password of SBC server, then press Enter.

      You should see output similar to the following, indicating a successful connection.

      Host 'ymp-demo.example.com' resolved to 203.0.113.10.
      Connecting to 203.0.113.10:2222...
      Connection established.
    4. Connect to the YMP server from the SBC server.
      #On the SBC server
      ssh -p {ymp_ssh_port} {ymp_username}@{ymp_private_ip}
      For example,
      sbcadmin@iZ8b6n3k2x9c1v0y7w5z4:~$ ssh -p 2222 ympadmin@192.168.10.10
    5. When prompted to enter a password, enter the SSH password of YMP server, then press Enter.

      You should see a welcome message, indicating that you have logged in to the YMP server successfully.

      Welcome to Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic x86_64)
  2. Prepare the environment.
    After successfully logging into the YMP server, ensure you have root privileges and that all the required tools are available for the backup process.
    1. Switch to the root user.
      #On the YMP server
      ympadmin@YMP1234567XYZ:~$ sudo -i

      Your shell prompt should change to indicate you are now operating as root, for example:

      root@YMP1234567XYZ:~# 
    2. Navigate to the Root directory.
      #After switching to root user
      root@YMP1234567XYZ:~# cd /root
    3. Download the migration shell script by executing the following command.
      wget https://help.yeastar.com/download/docs/migration-tool/ymp_data_migration.sh

      When the download completes, you should see a message:

      'ymp_data_migration.sh' saved
    4. Download the migration tool binary by executing the following command.

      wget https://help.yeastar.com/download/docs/migration-tool/datamigration
      When the download completes, you should see a message:
      'datamigration' saved saved
    5. Install the compression utility to compress backup files.
      apt-get install zip

      Wait for the installation to complete before proceeding.

  3. Start the Cloud PBX backup process.

    With the environment prepared, you can initiate the backup process for all Cloud PBXs hosted on the YMP server.

    1. Run the migration shell script.
      sh ymp_data_migration.sh

      The script will automatically package the backup files for all Cloud PBXs. Upon completion, the backup files will be compressed into a single archive named {sn}-datamigration_all.zip, where {sn} is the serial number of your YMP server.

      When the process is finished, you will see an output similar to the following:
      Finished: /root/YMP1234567XYZ-datamigration_all.zip
    2. When prompted to upload the backup archive to the SBC server, do as follows according to your needs:
      • To proceed with the upload, enter the SSH password of SBC server, then press Enter.
        Uploading to SBC...
        IP address is: 192.88.99.11
        sbcadmin@192.88.99.11 password: 
        YMP1234567XYZ-datamigration_all.zip
        The archive will be uploaded to the SBC server under the directory /home/yeastar.
      • To skip the upload, press Ctrl + C to cancel.
    3. If you want to download the backup archive to your local computer, use the sz command.
      sz {sn}-datamigration_all.zip

      For example,

      sz YMP1234567XYZ-datamigration_all.zip
      A file transfer dialog will appear; select the desired local destination folder to complete the download.

Result

You have obtained backup files for all Cloud PBXs hosted in YMP server.

What to do next

  1. Extract the backup archive to obtain specific Cloud PBX backup files, which are named in the format {pbx_sn}_pbxconfig.tar.
  2. Restore the backups to the target P-Series PBX systems. For more information, see the following topics: