Transfer using rsync

A method for transferring MikoPBX to another host using rsync (preferred)

This article discusses transferring data to a new host using rsync. This approach uses a generated SSH key for authentication, making it the most reliable and therefore the recommended method.

Schematically, the transfer process can be depicted as follows:

Data transfer scheme

Creating the Script File and Adding Content

  1. First, establish an SSH connection to your new MikoPBX. You can find instructions on how to do this in this article.

Successful SSH connection to the new MikoPBX
  1. Once connected, switch to the console ([9] Console). First, you need to create a directory to store the script file. Use the following command:

mkdir -p /storage/usbdisk1/transfer
  1. Navigate to the created directory:

cd /storage/usbdisk1/transfer
  1. Create the file "transfer-rsync.sh" to store the script:

touch transfer-rsync.sh
Running commands to create a file
  1. Next, you need to fill the file with the script content. You can find the script here.

Use the following command to download the script:

curl -o /storage/usbdisk1/transfer/transfer-rsync.sh https://gist.githubusercontent.com/excla1mmm/c9891306b459cac0c7ea3c785ab0936e/raw/ec57ab60ee48112b4a16635e7b47955e5a044513/transfer-rsync.sh

Running and Using the Script

  1. Make the file executable:

chmod +x transfer-rsync.sh
  1. Run the script:

./transfer-rsync.sh
  1. You will be prompted to enter necessary information about your old MikoPBX:

  • IP address of your old station

  • Username for SSH authentication

  • Port for SSH authentication

Entering the required data
  1. Next, you’ll be asked whether to generate a new key. If you haven’t done this before, type "y" to confirm. If you previously generated a key for accessing the second MikoPBX, type "n":

Generating a new key
  1. A new SSH key will be created. You must copy this key and insert it into the web interface of your old MikoPBX at General SettingsSSHSSH Authorized keys field.

Generated ssh key
Inserted key
  1. After saving the key on the old MikoPBX, wait a few seconds, then press any key to continue the script.

The transfer of all data to the new host will begin. This may take some time.

Successful transfer

Last updated

Was this helpful?