Skip to content

Lesson 34 · Admin

Backups and updates

For: Owner or whoever manages the server

A backup of the whole database is taken every night at 11:59 pm Pakistan time; the last 3 are kept. These commands run on the server (VPS):

JobCommand
Update the appbash /var/www/brick-kilm-erp/update.sh
Turn on nightly backups (once)bash /var/www/brick-kilm-erp/scripts/backup.sh --install
Back up nowbash /var/www/brick-kilm-erp/scripts/backup.sh
Restore a backupbash /var/www/brick-kilm-erp/scripts/backup.sh --restore <file>

Restoring: A restore replaces the live data. The current data is always saved first in /var/backups/brick-kiln/before-restore/, and the command prints how to undo it.

Log in Start free trial