Mike's PBX Cookbook

Backup the Linux Base

warning DO NOT underestimate the importance of having good backups!
Remember to perform these steps, and schedule regular backups.

Login to each server (CPDC) with admin2 privileges, and perform a system backup to an external USB drive, or SFTP server.

Configuring a SFTP server is not covered here, but it's usually pretty straight forward.
Solarwinds is a popular (free) SFTP server for Windows.

sysbackup

Syntax: sysbackup {-r|-s|-b|-c} | [--help]

Where: -rremove sysbackup task from schedule
-sshow sysbackup task schedule settings
-bexecute one-time backup
-csetup a backup schedule
--help Print help message and exit.

Perform system backup (both base and applications)

This command allows you to define where to backup data (USB device or SFTP server), and choose the type of backup (one-time backup or scheduled). It uses the Linux crontab mechanism to perform a scheduled backup.

NOTE: sysbackup will backup the Linux base, IP settings, and passwords only. It is not a complete backup solution.

One-time backup:

Run sysbackup -b to perform a one-time backup. You will be prompted to choose a back up destination:

$ sysbackup -b
1. Backup to USB device.
2. Backup to SFTP server.

Enter your choice (q for exit): 2

If you choose SFTP backup you will be prompted to enter the remote SFTP server parameters:

Enter the secure FTP server's IP address: 10.2.120.220
Enter the SFTP login: user1
Enter the SFTP password:
Enter the remote SFTP directory: /home/user1
Remote Configuration File Validation
--------------------------------------------------
  SFTP server IP: 10.2.120.220
     SFTP userid: user1
   SFTP password: **********
  SFTP directory: /home/user1

Is this information correct (Y/N) [Y]?

After confirmation the backup archive will be created:

Backup started. Please wait...
INFO Initializing
ThreadPoolExecutor
INFO Result=
Quantum backup restore completed
Successfully. Status=Quantum backup restore completed.
Performing Base Backup.
Checking for available patches in /var/opt/nortel/patch
Base Backup
Completed
Backup archive with name cppm2hardening2009_
03_0216_
39_32.tar.gz and size 640947 bytes was generated.
Backup operation may take a long time.
Do you want to continue (Y/N) [Y]? Y

To continue backup operation input yes - the backup archive (a tarball) will saved, and the operation completed:

Operation in progress. Please wait.
Read 638976 of 640947 bytes
Backup complete.


Scheduled backup:

Run sysbackup -c to perform a scheduled backup. You will be prompted to choose a backup destination (as with the one-time backup):

$ sysbackup -c
1. Backup to USB device.
2. Backup to SFTP server.

Enter your choice (q for exit): 1

For example here we have chosen a USB backup (the backup USB device should be pluged-in at that time). The first time using USB device for backup it should be formatted:

This disk must be formatted to use it as a backup storage.
Do you want to format it (Y/N) [Y]?

After formatting, select the schedule of the backup (for example every Friday at 23:00):

Do you want to use default backup time (midnight Sunday) (Y/N) [Y]? N

The value in the brackets is the default one. Use asterisk if you are going not to use this parameter.

Enter the minutes (059) [0]: 0
Enter the hour (023) [0]: 23
Enter day of month (131) [1]: *
Enter month (112) [1]: *
Enter day of week (17) [7]: 5

Until reset, your backup schedule will continue to run every Friday at 23:00.

The backup schedule can be reset by the command: sysbackup -r

Run sysbackup -s to review your backup schedule:

$ sysbackup -s
Backup configured:
Minute: 0
Hour: 0
Month: *
Day of month: *
Day of week: 7
Star symbol(*) means any number.


sysrestore

Syntax: sysrestore [--help]

Restore data from the backup archive.

This command retrieves the backup archive from the storage (USB device or SFTP server), restores application backed up data to the default backup directory and executes the restore scripts for installed applications (if they are defined).

You will be able to select a source for uploading the backup archive, eg:

$ sysrestore
1. Recover from USB device. 
2. Recover from SFTP server. 

Enter your choice (q for exit): 1

Having chosen the source, a list of available archives is shown. One of the backups should be chosen for the restore operation. Entering Zero (0) means exit, and will cancel the restore operation.

NOTE: sysrestore will restore the Linux base, IP settings, and passwords only. The technician must still manually deploy applications, patch and configure, as with a fresh installation.