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
- Log in MyPBX web interface, enable SSH and FTP on LAN Settings
- Press Win Key + Eto open the Windows Explorer, type ftp://MyPBX IP in the address bar, press Enter
- Enter the user name and password, click Log on.
- Username: root
- Password: ys123456
- Click hereto download the auto backup file, copy and paste the file to the root folder.
Step 2. Set the Script File Permission via SSH
- Log in MyPBX via SSH using PuTTY, enter MyPBX’s IP, choose Connection Type to SSH and set Port to
- Click Open and log in MyPBX with the following credential:
- Login as: root
- Password:ys123456
- Execute the command to set ysautobackup file permission:
chmod a+x /persistent/ysautobackup
Step 3. Set Auto Backup Frequency
- Edit task.tab file by the command: vi /persistent/task.tab, type i to enter the Insert mode.
- 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.
- Pressesc key, and type the command :wq to save the quit.
Step 4. Create add.sh File
- Create an add.sh file in the persistent folder by the command:
vi /persistent/add.sh
- Type i to enter the Insert mode, copy and paste the following contents in the file:
#!/bin/sh
crond &
crontab /persistent/task.tab
- 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.
1 Comments