Maintenance Commands

Use these commands when you upgrade ownCloud, manage encryption, perform backups and other tasks that require locking users out until you are finished.

maintenance
 maintenance:data-fingerprint        Update the systems data-fingerprint after a backup is restored
 maintenance:mimetype:update-db      Update database mimetypes and update filecache
 maintenance:mimetype:update-js      Update mimetypelist.js
 maintenance:mode                    Set maintenance mode
 maintenance:repair                  Repair this installation
 maintenance:singleuser              Set single user mode
 maintenance:update:htaccess         Updates the .htaccess file

maintenance:mode locks the sessions of all logged-in users, including administrators, and displays a status screen warning that the server is in maintenance mode. Users who are not already logged in cannot log in until maintenance mode is turned off. When you take the server out of maintenance mode logged-in users must refresh their Web browsers to continue working.

sudo -u www-data php occ maintenance:mode --on
sudo -u www-data php occ maintenance:mode --off

Putting your ownCloud server into single-user mode allows admins to log in and work, but not ordinary users. This is useful for performing maintenance and troubleshooting on a running server.

sudo -u www-data php occ maintenance:singleuser --on
Single user mode enabled

Turn it off when you’re finished:

sudo -u www-data php occ maintenance:singleuser --off
Single user mode disabled

Run maintenance:data-fingerprint to tell desktop and mobile clients that a server backup has been restored. This command changes the ETag for all files in the communication with sync clients, informing them that one or more files were modified. After the command completes, users will be prompted to resolve any conflicts between newer and older file versions.