Repository navigation
[Feature Request] NAS - SMB as storage destination for automatic Backups #1778
Replies: 2 comments 1 reply
|
Hi! :) Thanks for the suggestion! This is already possible with the "Scheduled backups to a folder on the server" feature, and Poznote doesn't need anything SMB-specific for it. In Settings > Server Backups (administrators only), you can choose the backup folder, turn on automatic backups (daily, weekly or monthly) and set a retention. The folder can be any path inside the container, so you mount your NAS share in the container and enter that path as the backup folder. The simplest way is to let Docker mount the SMB share itself with a CIFS volume in your docker-compose.yml, for example (replace the address, share name and credentials with yours) services:
webserver:
volumes:
- "./data:/var/www/html/data"
- "nas-backups:/backups"
volumes:
nas-backups:
driver: local
driver_opts:
type: cifs
device: "//192.168.1.10/poznote-backups"
o: "username=YOUR_USER,password=YOUR_PASSWORD,uid=82,gid=82,vers=3.0"Then run docker compose up -d and enter /backups as the backup folder in Settings > Server Backups. The uid and gid options matter, because Poznote must be able to write to the share. With the default image Poznote writes as www-data, which is uid 82, and with the rootless image it is uid 1000, so use uid=1000,gid=1000 there. If they are wrong, Poznote tells you the folder is not writable when you save it. One thing to know about this setup is that Docker mounts the share when the container starts, so if the NAS is unreachable at that moment, Poznote itself won't start. If your NAS is not always on, mount the share on the host instead (in /etc/fstab with the nofail option) and bind-mount that folder, for example "/mnt/nas/poznote-backups:/backups". I tested this setup with a Samba share. Backups, the archive list, downloading, restoring and deleting all work on the share. The full documentation is here: https://github.com/timothepoznanski/Poznote#nas-backups Let me know if it works for you! |
|
It works fine for me, very good. Thank you! |
Uh oh!
There was an error while loading. Please reload this page.
Hello :)
maybe could it be possible to implement options to configure a local NAS with SMB for example for the automatic backup ?
That would be great and seems like a easy way to backup locally.
All reactions