Commifreak / unraid-appdata.backup

UNRAID AppData backup plugin
17 stars 1 forks source link

Possibility to ignore warning bout empty/no volumes #16

Open realizelol opened 4 months ago

realizelol commented 4 months ago

Hi Commifreak,

thanks for you add-on. It's really helpful, but since the new version I'll get a lot of warning messages about containers without any volumes. For example: [⚠️][phpmyadmin] phpmyadmin does not have any volume to back up! Skipping. Please consider ignoring this container.

It would be nice to see a ignore checkbox for "empty containers" in settings so that the settings xml of this container still got backup. The other possibility to add this function individually per docker container to the dropdown menu e.g. "ignore emptiness".

I also added a start notification in pre-script maybe it's possible to also add this natively in settings.

best regards realizelol

OrbitingOcelot commented 4 months ago

It would be nice to see a ignore checkbox for "empty containers" in settings so that the settings xml of this container still got backup.

All your xmls will be backed up if you do a flash backup, they will be in this directory in the zip: \config\plugins\dockerMan\templates-user\

Maybe this will help you.

realizelol commented 4 months ago

Hey OrbitingOcelot,

thanks a lot for the clue of finding the source .xml files.

The .xml files still being backed up. But in case there's no volume in the container I'll get a warning message in log and also a mail notification. This should not be really a warning case. Just an information that it doesn't make much sense to backup an "empty" container.

I like my container backups all in the same place. Actually I'm ignoring that warning by adding a dump volume -v /mnt/user/appdata/phpmyadmin:/dump to the container to ignore the warning message.

Otherwise I have to delete 6 mails instead of 2 (start + stop[+incl. log]) as I owe 4 containers without a volume. Also mails containing a warning subject [AppdataBackup] Warning! isn't nice to see after you've woken up.

OrbitingOcelot commented 4 months ago

I found that if you list the volumes in the "exclude" section, the error/warning goes away. And I believe the dev already mentioned on the unraid forums that volumes will be supported in the next version :)

realizelol commented 4 months ago

You got me wrong. The warning message appears if you don't have any volume attached to your container. Volumes are already supported, maybe binds are not supported? Also there's a feature that internal volumes are backed up by default and external ones are not included by default and via the extra parameters you could include or exclude them. The internal ones should be recognized via the array path "/mnt/user/" if your volumes are mounted via different path for e.g. "/mnt/disks/USB-Drive" then this will be an external volume.

It's just the notification or warning about the "non-volume" containers. The Code can be found here: ABHelper.php#L385-L388

The the only thing that should be changed in my opinion is LOGLEVEL_WARN to LOGLEVEL_INFO as it's moreover an improvement than a warning.

OrbitingOcelot commented 4 months ago

Well, I guess we mean the same thing. The root of the confusion is that the appdata backup script calls "volumes" what in docker lingo is in fact a "bind mount". Volumes in docker are a separate thing, and incidentally since last update there were problems with "real" volumes, there is another issue open for that.

I was using the docker terminology as I am used to it, but I understand what you mean.

Commifreak commented 4 months ago

You are right, the naming is a bit confusing. mapping would be an alternative. Or the script calls it as detected: mount and volume.

Anyway, if a container has no volumes left, because it has nothing to backup/no mappings, just set "Skip?" to "Yes". The template xml still gets backed up!

realizelol commented 4 months ago

Ah great, thank you for the information. I just run a backup and there's no more warning message. Is skipping the volume the only thing that is skipped by that method? Than maybe it would make sense to add volume(s) to that so the complete line will be Skip volume(s)? or even Skip mapping(s)? to make it more clear? For me it sounded like "Skip everything" for the container.

Commifreak commented 4 months ago

It skips the backup. The xml are not backed up from dockerMans point of view. I just sace the whole user-templates folder