How to perform a custom backup on the My sCool Server?
Channel: My sCool Server - Empowering Education
Date: 2018-10-26

The My sCool Server has built in support for both internal as well as external media based recovery images and custom backups which give you the peace of mind to safeguard against unforeseen system failures. Being an open system, users are free to load their own custom content or may desire to backup the user data which is not covered under the system restore point feature. 

For such scenarios where custom backups are desirable, herein are the steps to achieve the same.

- Herein we shall perform a backup of the custom web content folder located at - /var/www/html/mss/custom 
- Directly boot into the MSS device
- Open Terminal
- Tip: To open terminal press Ctrl + Alt + T
- For performing a custom backup, become super user  sudo su -
- Enter password of mssadmin when prompted
- Execute a command to initialise the backup destination borg init --encryption=none [/backup/folder/path/] For e.g. If the backup destination is /home/mssadmin/custom_content, execute -
borg init --encryption=none /home/mssadmin/custom_content
- With no backups currently, the list command will return nothing borg list /home/mssadmin/custom_content
- Note: /home/mssadmin/custom_content must have sufficient space
- Next, execute the command to create snapshot - borg create --stats --progress --compression lz4 [/backup/folder/path/]::[snapshotname] [backup_source]
- For e.g. to create backup of /var/www/html/mss/custom, execute borg create --stats --progress --compression lz4 /home/mssadmin/custom_content::1 /var/www/html/mss/custom
- To verify the successful creation of the backup, execute - borg list /home/mssadmin/custom_content