Commifreak / unraid-appdata.backup

UNRAID AppData backup plugin
21 stars 1 forks source link

Script throws error when docker container uses docker volumes (instead of path mappings "bind mounts") #17

Open OrbitingOcelot opened 7 months ago

OrbitingOcelot commented 7 months ago

Hi! So I map most of my stuff into containers via path mappings (or bind mounts, as docker calls them), just like most folks would, however, I also have some usecases where I need to use the docker volume functionality. This works great, and is even supported by the unraid GUI, however the appdata-backup script does seem to get confused by this, tries to back this up a s a directory, and throws an error that the path does not exist.

[17.02.2024 02:53:06][❌][cloudsync] 'internal_rclone_bin_volume' does NOT exist! Please check your mappings! Skipping it for now.

Just to be clear, I don't need the docker volumes to be backed up, I would just like to get rid of the errors associated with them :)

Steps to reproduce:

  1. Map a volume directly into a test container instead of using path mappings
  2. Run script

Expected behaviour: Script ignores docker volumes, does not throw error if docker volumes are used

Here you can see an example definition of the run command unraid uses, with bind mounts (usual path mappings) and a volume:

docker run
  -d
  --name='cloudsync'
  -v 'internal_rclone_bin_volume':'/rclone/bin':'rw'
  -v '/mnt/user/appdata/some-path-mapping':'/app/some-path-mapping':'rw'
...

Thanks and have a great day!

OrbitingOcelot commented 7 months ago

I have now excluded the docker volumes, and all works fine, feel free to close this, unless you want to explicitly catch this case :)

Thanks for your great work, really love the script! 🙏