previewgenerator icon indicating copy to clipboard operation
previewgenerator copied to clipboard

Is there any way to choose where the thumbnails get generated?

Open aaronjrodrigues opened this issue 10 months ago • 2 comments

I have nextcloud aio and currently my data directory is a hdd, to help speed up I wanted to generate thumbnails and put them on the ssd? Does anyone know how exactly I can implement this?

aaronjrodrigues avatar Mar 16 '25 02:03 aaronjrodrigues

This is currently not possible. The previews will always be stored inside your data directory. You would have to move your whole data directory to another drive.

st3iny avatar Apr 15 '25 07:04 st3iny

Workarounds on Linux Systems:

⚠ WARNING: Use at your own risk! This workarounds may corrupt your data! If you don't fully understand the following steps, don't do this! ⚠

Version A (You can use one or more complete SSD):

  1. Stop all nextcloud containers.
  2. format disks, create raid, whatever you need to mount the SSDs
  3. mount to /mnt/preview
  4. rsync -AavxP /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview/* /mnt/preview/
  5. mkdir /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview.bak
  6. rsync --remove-source-files -AavxP /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview/* /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview.bak/
  7. umount /mnt/preview
  8. mount SSD to /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview/
  9. diff -qr /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview/ /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview.bak/ There should be no difference
  10. Start nextcloud
  11. create entry in /etc/fstab to automount on startup

Version B (You can only use a folder on the SSD):

  1. Stop all nextcloud containers.
  2. create the new preview folder on the SSD
  3. rsync -AavxP /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview/* /<path-to-new-preview-folder>/
  4. mkdir /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview.bak
  5. rsync --remove-source-files -AavxP /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview/* /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview.bak/
  6. ln -s /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview/ /<path-to-new-preview-folder>/
  7. diff -qr /<path-to-new-preview-folder>/ /<your-nextcloud-data-directory>/appdata_<your-instance-id>/preview.bak/ There should be no difference
  8. Start nextcloud ⚠ Make sure, that the Docker Container is allowed to follow the symlink.

KaeTuuN avatar Apr 24 '25 08:04 KaeTuuN

Mounting the ssd into the preview folder is a valid workaround. Symlinks have some caveat when using docker.

st3iny avatar Nov 08 '25 21:11 st3iny