Nextcloud: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
Created page with "= Client = * Sometimes the client can get stuck in very, very long operations (especially if you move or changed large folders around). This is normal - you can check the progress of what's going on in /home/elvanor/.config/Nextcloud/logs/. If it still writes to a log there, everything is fine, you just need to wait. * There is also a nextcloud_sync.log file, located at /home/elvanor/.local/share/Nextcloud/. There is probably a bug there as this file should be present i..."
 
Line 5: Line 5:


= Server =
= Server =
== General ==


* The Nextcloud server log (located at data/nextcloud.log) can grow very big and should be deleted from time to time.
* The Nextcloud server log (located at data/nextcloud.log) can grow very big and should be deleted from time to time.
* Each file version (and deleted files) are kept in data/elvanor/files_versions and data/elvanor/files_trashbin. Those folders can grow a lot and should be purged as well, however they can be very useful in case of serious issues. For instance, at some point I had a corrupted Calibre database - Calibre could not load it and would crash everytime. Restoring a previous version fixed the issue.
* Each file version (and deleted files) are kept in data/elvanor/files_versions and data/elvanor/files_trashbin. Those folders can grow a lot and should be purged as well, however they can be very useful in case of serious issues. For instance, at some point I had a corrupted Calibre database - Calibre could not load it and would crash everytime. Restoring a previous version fixed the issue.
* To retrieve a previous version of a file, use the web interface, it's easy and more robust than trying to find the correct file directly in the files_versions directory (if at all possible).
* To retrieve a previous version of a file, use the web interface, it's easy and more robust than trying to find the correct file directly in the files_versions directory (if at all possible).
== Installation & Configuration ==
* It's recommended to disable the MySQL log bin and set the transaction isolation level to READ-COMMITTED. This can be done permanently by editing /etc/my.cnf and modifying the following lines (be careful, this is a global setting on all databases):
disable_log_bin
#log-bin
transaction-isolation = READ-COMMITTED
* Setup a cron job:
crontab -u apache -e
* Add the following line:
*/5  *  *  *  * php -f /srv/net.elvanor/nextcloud/cron.php
* You can check with crontab -u apache -l.
== Locked Files ==
* I guess this should not happen, but if the server is refusing to sync because of locked files, you can manually purge all locks by directly connecting to the database and issuing:
DELETE FROM net_elvanor_nextcloud.oc_file_locks WHERE true;

Revision as of 09:33, 26 October 2025

Client

  • Sometimes the client can get stuck in very, very long operations (especially if you move or changed large folders around). This is normal - you can check the progress of what's going on in /home/elvanor/.config/Nextcloud/logs/. If it still writes to a log there, everything is fine, you just need to wait.
  • There is also a nextcloud_sync.log file, located at /home/elvanor/.local/share/Nextcloud/. There is probably a bug there as this file should be present in /home/elvanor/.config/Nextcloud/.

Server

General

  • The Nextcloud server log (located at data/nextcloud.log) can grow very big and should be deleted from time to time.
  • Each file version (and deleted files) are kept in data/elvanor/files_versions and data/elvanor/files_trashbin. Those folders can grow a lot and should be purged as well, however they can be very useful in case of serious issues. For instance, at some point I had a corrupted Calibre database - Calibre could not load it and would crash everytime. Restoring a previous version fixed the issue.
  • To retrieve a previous version of a file, use the web interface, it's easy and more robust than trying to find the correct file directly in the files_versions directory (if at all possible).

Installation & Configuration

  • It's recommended to disable the MySQL log bin and set the transaction isolation level to READ-COMMITTED. This can be done permanently by editing /etc/my.cnf and modifying the following lines (be careful, this is a global setting on all databases):
disable_log_bin
#log-bin
transaction-isolation = READ-COMMITTED
  • Setup a cron job:
crontab -u apache -e
  • Add the following line:
*/5  *  *  *  * php -f /srv/net.elvanor/nextcloud/cron.php
  • You can check with crontab -u apache -l.

Locked Files

  • I guess this should not happen, but if the server is refusing to sync because of locked files, you can manually purge all locks by directly connecting to the database and issuing:
DELETE FROM net_elvanor_nextcloud.oc_file_locks WHERE true;