Note
Please note, that since version 1.1.2 Live update feature is no longer available due to numerous issues. We have put different "live update" implementation on our schedule but for now manual update is the only option.
Manual update¶
For this guide we'll assume that your cBackup is installed in /opt/cbackup
-
Create backups (or even better - make full system snapshot):
$ tar czf /opt/backup-$(date +%Y-%m-%d).tar.gz -C /var/www/html . $ mysqldump -u root -p cbackup | gzip > /opt/backup-$(date +%Y-%m-%d).sql.gz
-
Download the latest update
$ wget http://cbackup.me/latest?package=update -P /opt -O update.tar.gz
-
Create lock file in your cBackup installation folder to enable maintentance mode, blocking access to the interface
$ touch /var/www/html/update.lock
-
Stop the service
In case of systemd usesudo systemctl stop cbackup
In case of SysVinit usesudo service cbackup stop
-
Unpack downloaded archive to your cBackup installation overriding all files
$ tar -xzf /opt/update.tar.gz -C /opt/cbackup
-
Remove archive
$ rm -f /opt/update.tar.gz
-
Restore permissions
If you have nginx or running web server with another user:group - adjust corresponding data$ chown -R apache:apache /opt/cbackup
-
Update database
$ /opt/cbackup/yii migrate
-
Flush cache and runtime resources
$ /opt/cbackup/yii cache/flush-all $ /opt/cbackup/yii asset/flush-all
-
Start service
$ sudo systemctl start cbackup
-
Remove lock file
$ rm /opt/cbackup/update.lock
Pay attention
It's strongly recommended to reset your browser cache for your cBackup installation by pressing CTRL+F5
Update is complete
Now update is finished, check if everything works as it is intended.