User Tools

Site Tools

This documentation is no longer maintained by the Turris team (although it can be used by the community to share content). The current official documentation is at docs.turris.cz.

Backup of Nextcloud instance

You can find more information in documentation here - https://docs.nextcloud.com/server/12/admin_manual/maintenance/backup.html

Below is set of commands which works on Turris Omnia

# enable maintenance mode
sudo -u nobody php-cli /srv/www/nextcloud/occ  maintenance:mode --on

# backup files
rsync -ax /srv/www/nextcloud /srv/www/nextcloud-dirbkp_`date +"%Y%m%d"`/

# backup database
mysqldump --single-transaction -h localhost -u root nextcloud  > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak

# disable maintenance mode
sudo -u nobody php-cli /srv/www/nextcloud/occ  maintenance:mode --off