
Now, we have to try to upload your file on the owncloud. Next, we disable maintenance mode by typing the below command:įor RedHat Distribution (RHEL, CentOS, AlmaLinux, RockyLinux): sudo -u apache php /var/www/html/nextcloud/occ maintenance:mode -offįor Ubuntu/Debian: sudo -u wwwrun php /var/www/html/nextcloud/occ maintenance:mode -offįor OpenSUSE: sudo -u www-data php /var/www/html/nextcloud/occ maintenance:mode -off
#Owncloud backup update
Open the config.php file in the folder /config, and update it in the datadirectory section: 'datadirectory' => '/data/owncloud', If the result is returned or not empty, you must run the SQL below: UPDATE oc_jobs Type the below command: SELECT * FROM oc_jobs WHERE id='local::/var/www/html/owncloud/data/' Next, we enable maintenance mode to avoid running cron jobs by typing the below command:įor RedHat Distribution (RHEL, CentOS, AlmaLinux, RockyLinux): sudo -u apache php /var/www/html/owncloud/occ maintenance:mode -onįor Ubuntu/Debian: sudo -u wwwrun php /var/www/html/owncloud/occ maintenance:mode -onįor OpenSUSE: sudo -u www-data php /var/www/html/owncloud/occ maintenance:mode -onĪfter that, configure the owncloud database by typing the below commands in your database: use owncloud

I assume you use apache and type the below command:įor RedHat Distribution (RHEL, CentOS, AlmaLinux, RockyLinux): systemctl stop httpdįor Ubuntu/Debian and OpenSUSE: systemctl stop apache2Īfter that, we use the rsync command to synchronize data: rsync -avz /var/www/html/owncloud/data /data/owncloudĪnd we rename the existing data directory by typing the below command: mv /var/www/html/owncloud/data /var/www/html/owncloud/data-backup We will move a Data Directory of OwnCloud from /var/www/html/owncloud/data folder to /data/owncloud folder.īy typing the below command: mkdir -p /data/owncloud
