How to Schedule a Backup in MyPBX

Introduction

In this article, we introduce how to schedule a backup of MyPBX using a script file.

Step 1. Upload Auto Backup Script File MyPBX via FTP

  1. Log in MyPBX web interface, enable SSH and FTP on LAN Settings

__1.png

  1. Press Win Key + Eto open the Windows Explorer, type ftp://MyPBX IP in the address bar, press Enter

__2.png

  1. Enter the user name and password, click Log on.
  • Username: root
  • Password: ys123456

                      __3.png

  1. Click hereto download the auto backup file, copy and paste the file to the root folder.

                   __4.png

 

Step 2. Set the Script File Permission via SSH

  1. Log in MyPBX via SSH using PuTTY, enter MyPBX’s IP, choose Connection Type to SSH and set Port to

                      __5.png

  1. Click Open and log in MyPBX with the following credential:
  • Login as: root
  • Password:ys123456

          __6.png

  1. Execute the command to set ysautobackup file permission:

   chmod a+x  /persistent/ysautobackup

           __7.png

Step 3. Set Auto Backup Frequency

  1. Edit task.tab file by the command: vi /persistent/task.tab, type i to enter the Insert mode.

        __8.png

  1. If you want the system to do auto backup at 1stof  every month, type the following contents in the task.tab file:

* * 1 * * /persistent/ysautobackup

Explanation of the contents:

minute hour day Of Month Month day Of Week command To Run.

        __9.png

  1. Pressesc key, and type the command :wq to save the quit.

Step 4. Create add.sh File

  1. Create an add.sh file in the persistent folder by the command:

  vi /persistent/add.sh

  1. Type i to enter the Insert mode, copy and paste the following contents in the file:

#!/bin/sh

crond &

crontab  /persistent/task.tab

          __10.png

  1. Press esc key, and type the command :wq to save the quit.

Step 5. Reboot MyPBX

Reboot MyPBX manually to make the script take effect.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.