files_snapshots
files_snapshots copied to clipboard
Usage with Docker containers
Can this app be used with containers such as the ones provided by Nextcloud or Linuxserver?
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.
More interested in the btrfs use case, having more info in the future on usage with containers would be appreciated!
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 :/
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/
.
There is some workaround for this solution ?
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:
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.