I want to shut down all processes which could have access to /var/www in order to make a backup of /var/www by:
sudo rsync -ax --progress /var/www /mnt/new_hdd
What is the appropriate approach?
Maybe stop the nginx Webservice?
Or from the NC Help:
To backup a Nextcloud installation there are four main things you need to retain:
- The config folder
- The data folder
- The theme folder
- The database
maintenance:mode locks the sessions of logged-in users and prevents new logins in order to prevent inconsistencies of your data. You must run
occ as the HTTP user, like this example on Ubuntu Linux:
$ sudo -u www-data php occ maintenance:mode --on
You may also put your server into this mode by editing
config/config.php . Change
"maintenance" => false to
"maintenance" => true :
<?php "maintenance" => true,
Don’t forget to change it back to `false` when you are finished.
First. Maintenance mode is important. Not enough to close the webserver since command line occ could be run with cron jobs.
Don’t forget you need to make a backup of your sql database too.
may be this is helpful as well.