# Transfer using scheduled backup (SFTP)

The second method involves setting up automatic scheduled backups, saving the data directly onto the target server via SFTP. This approach is particularly convenient for transferring larger amounts of data, as it eliminates the need for intermediate storage of the backup.

## Configuring Scheduled Backup

First, you need to configure scheduled backups for the MikoPBX you want to transfer data from.

1. Go to the **"Backup"** module. Navigate to the **"Backup Schedule"** tab:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fia4SDFtpdzNBkfjA45pU%2FbackupSchedule.png?alt=media&#x26;token=45803740-c1e1-44ee-abb6-ddce7eb4d703" alt=""><figcaption><p>"Backup schedule" button</p></figcaption></figure>

2. Next, set the scheduled backup parameters:

* **Server Address**: Enter the address of your new MikoPBX server.
* **Mode**: SFTP mode
* **Port**: 22
* **Username**: The SSH username for your **new** MikoPBX server.
* **Password**: The SSH password for your **new** MikoPBX server.
* **The path on the server**: `"/storage/usbdisk1/mikopbx/backup/"`

For information on SSH connection, refer to the related documentation. To start the backup immediately after saving the settings, choose the option **"Start backup immediately after saving settings"**. You can also select the specific data you want to transfer in the corresponding section.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FN1VMB3hjuDxNWeoggG7t%2Fsettings.png?alt=media&#x26;token=f7a28908-47f3-4782-bea3-d4e895ab6bbf" alt=""><figcaption><p>Parameters of backup</p></figcaption></figure>

Wait for the backup to complete, and then shut down the old machine.

## Restoring from the Backup on the New Host

If the data transfer is successful, your backup will appear in the backup module section on the new host:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Ffd8TLvkoMKjW4t2eyscA%2FsavedCopy.png?alt=media&#x26;token=09d20a41-21ed-40d2-a4b2-d6aab4171098" alt=""><figcaption><p>Backup copy</p></figcaption></figure>

To restore from the backup on your new host, do the following:

1. Go to the backup settings by clicking on the respective element:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FQNMr6lll0K6nW2hAGzf3%2FsavedCopy.png?alt=media&#x26;token=d21e8d18-39db-4a6c-b19a-38e4bfc29a1b" alt=""><figcaption><p>Way to recovery settings from a copy</p></figcaption></figure>

2. Select the data you need to transfer and click **"Restore from a backup"**:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FTyQMduJOlrxH2BKlecRY%2FrestoreFromABackup.png?alt=media&#x26;token=62fd19ac-2d62-41cd-8205-71855f1e017c" alt=""><figcaption><p>"Restore from a backup"</p></figcaption></figure>
