Difference between revisions of "CentOS 7.x Owncloud maintenance"

From Notes_Wiki
m
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<yambe:breadcrumb self="Owncloud maintenance">CentOS_7.x_owncloud|Owncloud</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x Web Based Tools|Web Based Tools]] > [[CentOS 7.x owncloud|owncloud]] > [[CentOS 7.x Owncloud maintenance]]
=CentOS 7.x Owncloud maintenance=


==Owncloud regular maintenance using cron script==
==Owncloud regular maintenance using cron script==
For regular owncloud maintenance cron job create '<tt>/etc/cron.daily/owncloud-maintenance.sh</tt>' with
For regular owncloud maintenance cron job create '<tt>/etc/cron.hourly/owncloud-maintenance.sh</tt>' with
<pre>
<pre>
     #!/bin/bash
     #!/bin/bash
Line 9: Line 8:
     sudo -u daemon /opt/owncloud-10.1.0-1/php/bin/php -f cron.php
     sudo -u daemon /opt/owncloud-10.1.0-1/php/bin/php -f cron.php
</pre>
</pre>
Note in case of source based installation user name would perhaps be apache and not daemon.  Also note that above example assumes bitnami stack based installation.  For source based installation cd might be required to /var/www/html/owncloud folder.  '''For large installations having several TB of data maintenance can go on for more than a day''', in such cases run maintenance manually or via /etc/cron.weekly or /etc/cron.monthly instead.
OR on newer versions use
<pre>
    #!/bin/bash
    cd /opt/owncloud-10.1.0-1/apps/owncloud/htdocs
    sudo -u daemon /opt/owncloud-10.6.0-2/php/bin/php -f occ system:cron
</pre>
Note in case of source based installation user name would perhaps be apache and not daemon.  Also note that above example assumes bitnami stack based installation.  For source based installation cd might be required to /var/www/html/owncloud folder.  '''For large installations having several TB of data maintenance can go on for more than a day if not run frequently.'''


Refer:
Refer:
Line 29: Line 34:




<yambe:breadcrumb self="Owncloud maintenance">CentOS_7.x_owncloud|Owncloud</yambe:breadcrumb>
==Remove older versions of various files==
Owncloud also has in-built versioning to maintain old versions.  This can use quite a lot of space.  If you want to remove these old versions to reclaim space (esp. if there are fairly frequent and adequate backups), use:
<pre>
  cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs
  sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ versions:cleanup
</pre>
 
Refer:
* https://docs.nextcloud.com/server/12/admin_manual/configuration_server/occ_command.html#versions
* https://doc.owncloud.com/server/user_manual/files/version_control.html
 
 
 
 
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x Web Based Tools|Web Based Tools]] > [[CentOS 7.x owncloud|owncloud]] > [[CentOS 7.x Owncloud maintenance]]

Latest revision as of 09:27, 25 August 2022

Home > CentOS > CentOS 7.x > Web Based Tools > owncloud > CentOS 7.x Owncloud maintenance

Owncloud regular maintenance using cron script

For regular owncloud maintenance cron job create '/etc/cron.hourly/owncloud-maintenance.sh' with

    #!/bin/bash
    cd /opt/owncloud-10.1.0-1/apps/owncloud/htdocs
    sudo -u daemon /opt/owncloud-10.1.0-1/php/bin/php -f cron.php

OR on newer versions use

    #!/bin/bash
    cd /opt/owncloud-10.1.0-1/apps/owncloud/htdocs
    sudo -u daemon /opt/owncloud-10.6.0-2/php/bin/php -f occ system:cron

Note in case of source based installation user name would perhaps be apache and not daemon. Also note that above example assumes bitnami stack based installation. For source based installation cd might be required to /var/www/html/owncloud folder. For large installations having several TB of data maintenance can go on for more than a day if not run frequently.

Refer:


Remove deleted files from various users trashbin

To remove deleted files from trashbin of all users use:

  cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs
  sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ trashbin:cleanup

Refer:


Remove older versions of various files

Owncloud also has in-built versioning to maintain old versions. This can use quite a lot of space. If you want to remove these old versions to reclaim space (esp. if there are fairly frequent and adequate backups), use:

  cd /opt/owncloud-10.0.10-4/apps/owncloud/htdocs
  sudo -u daemon /opt/owncloud-10.0.10-4/php/bin/php occ versions:cleanup

Refer:



Home > CentOS > CentOS 7.x > Web Based Tools > owncloud > CentOS 7.x Owncloud maintenance