files_snapshots icon indicating copy to clipboard operation
files_snapshots copied to clipboard

Usage with Docker containers

Open realies opened this issue 6 years ago • 6 comments

Can this app be used with containers such as the ones provided by Nextcloud or Linuxserver?

realies avatar Dec 23 '18 16:12 realies

it is, getting the snapshots accessible to docker might involve some work though.

zfs for example, uses automount magic to mount the snapshots on demand which doesn't work within containers, in the past I've gotten it to work by exporting the snapshot directory trough nfs and then mounting it back to the same host, passing that directory to docker.

icewind1991 avatar Dec 26 '18 17:12 icewind1991

More interested in the btrfs use case, having more info in the future on usage with containers would be appreciated!

realies avatar Dec 26 '18 17:12 realies

This seems to work for me with docker: I bind-mounted the data folder in docker and set /var/www/html/data/.zfs/snapshot as directory.

I did ls that directory from the host earlier in the same session though, so maybe that is why it works?

Also, thank you so much for this!

Edit: Ah... I can see the snapshots, but not their content :/

clawoflight avatar Sep 08 '19 08:09 clawoflight

I am also curious about this question, did you ever figure out how to use it? inside the docker I can see all the snapshots in /data/.zfs/snapshot/ but when I input the same path into the plugin it can't find the snapshots even though I can see them with ls inside /data/.zfs/snapshot/.

thierrybla avatar Jun 02 '20 22:06 thierrybla

There is some workaround for this solution ?

piotr-sikora-v avatar Nov 20 '20 11:11 piotr-sikora-v

I can not really explain why but sometimes it works and sometimes not. I do docker-compose down and up several times and sometimes it works as you can see here:

image

Also mounted as volume in Docker:

services:
  nextcloudpi:
    restart: always
    container_name: nextcloudpi
    image: ownyourbits/nextcloudpi-arm64:latest
    expose:
      - 80
      - 443
      - 4443
    volumes:
      - ${APPDATA}/nextcloud:/data
      - ${SYNOLOGY}:/synology
      - ${APPDATA}/nextcloud/.zfs/snapshot:/snapshot
      - /etc/localtime:/etc/localtime:ro
    networks:
      - nextcloudpi

The problem is that the mounting seems to block the autoprune function.

saschabrockel avatar Oct 19 '22 15:10 saschabrockel