Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Message added by KluthR,

[Plugin] Appdata.Backup

Featured Replies

On 12/2/2024 at 6:19 PM, blaine07 said:

Well, that does seem to work as far as saving things past that certain point I couldn't make changes past. For now will probably just set it as a script to start when Unraid starts array; seems to work though. Server scheduled to backup regularly tonight; i'll be able to tell pretty quickly if it excludes the stuff it should this time. 

Did successfully backup, and even not crash Unraid, after having applied your above script. Backing up took a bit less time since I was successfully able to exclude backing up some things that didn't need to be.

 

What has to be/needs to be modified about your script above so that I can use "user scripts" to apply it at "array start"? I feel like it has to have something else with your code to run it at array start in user scripts?

 

Thank you for the temp fix, i sure appreciate it ! 

  • Replies 2.2k
  • Views 365k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Feature freeze I have less and less time for a complete care of this plugin. You already noticed this with the fact, that announced features were not implemented yet. Another reason is, that I will mo

  • The new update is coming It been a while since the last stable update. There were some betas (never got feedback though) but I had other work to do the last weeks. I tested the major changes agai

  • 2023.08.28 should fix the docker auto update issue.

Posted Images

  • Author
8 minutes ago, blaine07 said:

What has to be/needs to be modified about your script above so that I can use "user scripts" to apply it at "array start"?

If combined with reboot: nothing

On 4/10/2023 at 9:22 AM, KluthR said:

Appdata.Backup

appicon.png.ac641069fde4d362d9dec12df3fda3a8.png

Support Thread

This is the support thread for appdata.backup (formerly known as ca.backup2).

 

 

This plugin primary takes care of your appdata backup! It allows you to configure backup settings for each of your docker containers. Flash and VM meta backup is integrated as well!

 

If you encounter any issues, post it here with the debug log file attached!

For your beta feedback, please post here instead!

 

Why do I need to reinstall the plugin (again)?

After my adoption of the ca.backup2 plugin (which needed a manual reinstall from every user the 1st time), I decided to make a complete overhaul of the whole plugin. The main reason was the PHP8 incompatibility. This new plugin is the result. Because it is actually a seperate new plugin, you have to switch to it manually again. This will be the last time ;)

 

Hints

The plugin send me here to check for some Plex exclusions.

Yes, thats right. You dont need to save Plex cache (and some other) directories. But its up to you to exclude them or not. Currently you are advised to set the following exclusions for plex:

  • Each following paths need to be prefixed with your correct appdata path!
    • Library/Application Support/Plex Media Server/Cache
    • Library/Application Support/Plex Media Server/Media
    • Library/Application Support/Plex Media Server/Metadata

 

The plugin sent me here for help with the grouping function

The grouping function allows you to group cotainers. The backup process stops all those containers, backup them and starts them back up before going to the next single container. This works for the mode "Stop, backup, start for each container" only. If the plugin reaches a group, it stops all containers in it, backup them and start them back up. The backup method "Stop all, backup, start all" has no effect here because every single container will be stopped nefore starting backup.

 

The plugin sent me here to get help for the "Mapping used in multiple containers!" message

The plugin can detect if you use the same mapping within more containers. That is completely okay but you should know that this can lead to "verification failed: contents differ" messages if you use stop/backup/start method and another container modifies the data during backup of the container that uses that share.

The best way to get rid of that message is to add that share to the exclusion in all but the main container. One could also change the backup type but it does not prevent backing that share up multiple times!

 

Hey all,

 

Wondering if anyone has an explanation around the plex exclusions and what could be lost due to being excluded?

 

my main concern is if I have any custom artwork or media info that would be lost with these exclusions...

 

Any input is appreciated.

 

Edited by Aerodb

7 minutes ago, Aerodb said:

 

Hey all,

 

Wondering if anyone has an explanation around the plex exclusions and what could be lost due to being excluded?

 

my main concern is if I have any custom artwork or media info that would be lost with these exclusions...

 

Any input is appreciated.

 

I think the main reason for the exclusion is that it can cause the backup to take a very long time when there are large numbers of small files (possibly hours) in the case of metadata. This means your docker will be shutdown for an extended period while waiting for the backup to complete. Also, if other dockers make changes to metadata, media, cache, etc during the backup process the backup will fail to verify.

 

For me the artwork isn’t critical. Plex will grab it again if it’s lost. So I don’t worry about metadata. You can test for yourself if you like. See how long backups take without any exclusions and if any fail.

9 minutes ago, wgstarks said:

I think the main reason for the exclusion is that it can cause the backup to take a very long time when there are large numbers of small files (possibly hours) in the case of metadata. This means your docker will be shutdown for an extended period while waiting for the backup to complete. Also, if other dockers make changes to metadata, media, cache, etc during the backup process the backup will fail to verify.

 

For me the artwork isn’t critical. Plex will grab it again if it’s lost. So I don’t worry about metadata. You can test for yourself if you like. See how long backups take without any exclusions and if any fail.

 

 I found that the custom posters are housed in the metadata folder. So if anyone is also concerned about this data being preserved, while it will add time and potential errors, I will choose not to exclude this item.

 

source - https://www.plexopedia.com/plex-media-server/general/metadata-stored/

for me and plex. I don't care about the movie, tv data files(I can regrab them or rip them again...) its the entire Plex libray folder.
Plex has a database file and metadata location. make sure the path to the libray is on disk and in the appdata backup settings.

 

Hello,

Quick question. What does this log mean? It says it for each of my containers when backing up.
"Should NOT backup external volumes, sanitizing them..."

59 minutes ago, mattgfx7 said:

Hello,

Quick question. What does this log mean? It says it for each of my containers when backing up.
"Should NOT backup external volumes, sanitizing them..."

External volumes would be anything outside of Appdata typically such as the paths you have defined in the container configuration. The default is to NOT back these up but you can change that by clicking the docker name. You should be cautious with this setting though. For example, if you have 20TB of movies and set Radarr to backup external volumes it's going to create backups for every movie.

23 hours ago, KluthR said:

If combined with reboot: nothing

So if you remember my server was often crashing backing up USB stick - today USB stick backup just FAILED and I was able to get a log..

 

Does this perhaps tell you anything useful?

176d1153-c2b1-4fbc-a61c-39045f347fb1

Screenshot 2024-12-05 060908.png

Edited by blaine07

  • Author

No. The process just wasnt able to do a simple copy to the destination. A syslog from that time would be maybe more interesting.

15 hours ago, wgstarks said:

External volumes would be anything outside of Appdata typically such as the paths you have defined in the container configuration. The default is to NOT back these up but you can change that by clicking the docker name. You should be cautious with this setting though. For example, if you have 20TB of movies and set Radarr to backup external volumes it's going to create backups for every movie.

Thank you for the info. I definitely don’t want to do this. Will this message pop up every time even if I don’t have external volumes enabled ? Thanks 

50 minutes ago, mattgfx7 said:

Thank you for the info. I definitely don’t want to do this. Will this message pop up every time even if I don’t have external volumes enabled ? Thanks 

It does for me.

On 12/3/2024 at 1:33 PM, KluthR said:

Yes. Named volumes are not supported at this time.

Do you mean, me? How can I fixed this or how can I disabled this message?

 

The Button ignored errors by running are not resolved this.

8 minutes ago, Revan335 said:

How can I fixed this or how can I disabled this message?

Put 'nextcloud_aio_mastercontainer' in the exclusion list for any container that accesses it.

On 12/7/2024 at 11:08 AM, Kilrah said:

Put 'nextcloud_aio_mastercontainer' in the exclusion list for any container that accesses it.

Do you mean the Global Exclusion at the Bottom?

Yes, or put it as exlcuision under each container that has it separately. First is easier obviously.

I currently have an issue in which my backups fail because, from what I can tell, the verification of the backup of some docker containers fails. This isn't exclusive to certain containers but rather happens with a bunch of them, one day one fails, the next day everything works fine, another day some other fails. 

 

But whenever it fails, it is always the same process, here is an example:

 

First, it tries to stop the container which, for some reason, doesn't work

[10.12.2024 00:10:02][ℹ️][plex] Stopping plex... Error while stopping container! Code: Container already started - trying 'docker stop' method
[10.12.2024 00:10:02][ℹ️][plex] That _seemed_ to work.

 

then it does the backup and the TAR verification fails

[10.12.2024 00:42:59][ℹ️][plex] Should NOT backup external volumes, sanitizing them...
[10.12.2024 00:42:59][ℹ️][plex] Calculated volumes to back up: /mnt/user/appdata/plex
[10.12.2024 00:42:59][ℹ️][plex] Backing up plex...
[10.12.2024 01:15:30][ℹ️][plex] Backup created without issues (took 00:32:31 (hours:mins:secs))
[10.12.2024 01:15:30][ℹ️][plex] Verifying backup...
[10.12.2024 01:22:46][][plex] tar verification failed! ...
[10.12.2024 01:24:31][ℹ️][plex] Installing planned update for plex...

 

I don't know why the stopping of the container would fail since there is no error being logged.

However, it seems that the verification failed because the backup was done while the container was running. At least that is what I am guessing because the verification failed and also states "Contents differ".

 

I also tried to help the plugin out by stopping all running containers in a pre-run script but with the command listed below, it says the following log message.

#! /bin/bash
docker stop $(docker ps -a -q)

 

[10.12.2024 00:00:02][ℹ️][Main] Executing script '/mnt/user/appdata/pre-run-backup.sh' 'pre-run' '/mnt/user/system-backup/appdata/ab_20241210_000002'...
[10.12.2024 00:00:02][ℹ️][Main] Script executed!
[10.12.2024 00:00:02][⚠️][Main] Script did not returned 0 (it returned 127)!

 

Which, to my knowledge, that return code 127 means that it is a "command not found". I mean the command itself runs without issues, I also have executed the script manually and it does what it is supposed to do without issues. How can the docker command not be found? Is the script executed in some way that some basic Unraid parts are not available? 

 

This whole thing raises some questions for me:

  • Why is the log message "Container already started" when there is a log message of "stopping the container"?
  • Apparently, the "docker stop" command never works (for me) even though it says that it "seems to work". (there is no restart=always or anything like that on the docker container). If this isn't "docker stop" that is attempted here, what is being used here to stop the containers?
  • Why is a simple pre-run script with "docker stop" returning 127 instead of 0 even though I can execute it just fine manually?

 

If I select "Copy the flash backup to a custom destination This is optional", then the USB drive backup is saved in both directories. So you have the backup of the USB stick twice? Why isn't it deleted?

40 minutes ago, Kono said:

So you have the backup of the USB stick twice?

That's the goal, for example that 2nd destination can be somewhere that's accessible if the server is down. 

ok that makes sense

Really long thread, so I figured that it would be easier to ask outright:

I'm setting up a 2nd Unraid server that will be solely for apps/Docker. Can I use this plugin to restore my current apps to the new server, meaning that it will basically do everything other than adjust the paths as required?

It'll put the appdata as it was in the folder it was in and optionally put back the templates that were backed up into the flash drive.

 

Hello everyone. I host a Minecraft server via Binhex Dockercontainer. Recently, however, the container can no longer be backed up and gives the error «[][binhex-minecraftserver]: 'binhex-shared' does not exist. Please check your mappings». Unfortunately, I don't know what is meant by "binhex-shared". Do any of you have an idea? Thanks for any help!

 

Debug-Log: 286233e1-a7e1-46dc-84a2-136c9a9f8d14

Search this thread for "binhex-shared" and you'll find how to exclude it.

It still gets backed up anyway.

Edited by Kilrah

36 minutes ago, Kilrah said:

Search this thread for "binhex-shared" and you'll find how to exclude it.

It still gets backed up anyway.

Thanks a lot for the help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.