[Plugin] CA Appdata Backup / Restore v2


Squid

Recommended Posts

Just updated on one of my servers and it ran into errors

 

2022/12/08 20:09:50 [15577] total size is 1,010,836,695  speedup is 19.19
[08.12.2022 20:09:52] Backing up libvirt.img to /mnt/user/Backups/libvirt backup/
[08.12.2022 20:09:52] Backing Up appData from /mnt/user/appdata/ to /mnt/user/Backups/appdata backup/[email protected]
[08.12.2022 20:09:52] Separate archives disabled! Saving into one file.
[08.12.2022 20:09:52] Backing Up
/usr/bin/tar: ./PlexMediaServer/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/d4/: Cannot savedir: Structure needs cleaning
/usr/bin/tar: ./PlexMediaServer/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/8f/: Cannot savedir: Structure needs cleaning
/usr/bin/tar: ./PlexMediaServer/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/6d/: Cannot savedir: Structure needs cleaning
/usr/bin/tar: Exiting with failure status due to previous errors
[08.12.2022 20:25:42] tar creation failed!
[08.12.2022 20:25:42] done

 

Link to comment
/mnt/user/appdata/PlexMediaServer/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder

is in my excluded folders so it shouldn't even be looking at it in the first place

 

i am able to open the folder but they are all empty

 

EDIT: Appears that when i migrated the settings from the old version there was a stray space in the excluded folders path which i assume is what messed it up.

running another backup now and will get back to you

 

+1 to the suggestion about better excluded folders management:D

Edited by MammothJerk
  • Like 1
Link to comment
21 hours ago, wgstarks said:

The default location for the docker image would be /mnt/cache/docker.img but if you want it to be in appdata you can just exclude it from the backups. If you already have other exclusions set just enter it as ,/mnt/cache/appdata/docker.img (note the comma at the beginning).

This is true but not the issue. I dont want to exclude it. I want the plugin to stop all containers before it starts the backup. In its current form it only stops docker containers within the specified appdata folder. In my setup I have all my plex appdata on its own dedicated SSD. As a result the plugin does not stop this container.... which in turn mean that plex makes changes to docker.img and causes the error I am experiencing. Or at least I believe this to be the issue in my case. I could be wrong. Is it possible to have the plugin stop the docker service before starting the backup? I imagine that would stop all docker containers not just those within the appdata folder.

Link to comment
22 hours ago, ultimz said:

Not sure where to post this but I have changed over to "Appdata Backup/Restore v2" and when I run the Update Assistance it returns the following:

 

Issue Found: ca.backup2.plg is not known to Community Applications. Compatibility for this plugin CANNOT be determined and it may cause you issues.

Should be fixed now

  • Like 1
Link to comment
36 minutes ago, tazire said:

This is true but not the issue. I dont want to exclude it. I want the plugin to stop all containers before it starts the backup. In its current form it only stops docker containers within the specified appdata folder. In my setup I have all my plex appdata on its own dedicated SSD. As a result the plugin does not stop this container.... which in turn mean that plex makes changes to docker.img and causes the error I am experiencing. Or at least I believe this to be the issue in my case. I could be wrong. Is it possible to have the plugin stop the docker service before starting the backup? I imagine that would stop all docker containers not just those within the appdata folder.

 

20 hours ago, KluthR said:

Did you uninstalled the old version first?

 

Please take a look inside the log file

 

You backup your docker.img? Why? Also, its being changed, because ca.backup2 writes the logfile into it, so it never worked before, but the error was being suppressed

 

ca.backup2 does not stop plex neither JD. Only two containers are being stopped:

[07.12.2022 07:20:01] Stopping pihole...  done! (took 4 seconds)
[07.12.2022 07:20:05] Stopping SyncoveryRS...  done! (took 7 seconds)

Dumb question but: Were the containers started? I think I will add some more (debug) info for the next release to track that down.

 

The just released update should fix this - sorry!

@tazire

As @KluthR pointed out, you can’t backup the docker image. It will always fail the file check due to the fact that it has changed during the backup process.

  • Like 1
Link to comment

When I updated to the new plugin, I had to disable verification or it would fail every time. I do not stop a couple dockers, PiHole so I don't lose DNS and Scrypted so I don't lose cameras. The old version was fine with that but the new one fails verification as it detects changes, maybe the old version wasn't actually verifying anything, and its actually working now, but in any case I disabled verification and it works great now, no issues.

Link to comment
1 hour ago, tazire said:

within the specified appdata folder.

No, thats not true. There is no connection between your source folder and the containers being stopped. ALL containers will be stopped (unless they are excluded, Paused or Stopped).

 

11 minutes ago, Jclendineng said:

maybe the old version wasn't actually verifying anything

Exactly! In detail: Yes, the old version verified but the result was not correctly returned back to the plugin. Like: tar verify ok: plugin sees: all ok!

tar verify failed: plugin sees: all ok!

 

So, if after the update, the plugin starts to complain about verifying failed, it was an issue before the update as well but simply not detected.

  • Like 1
Link to comment
51 minutes ago, wgstarks said:

 

@tazire

As @KluthR pointed out, you can’t backup the docker image. It will always fail the file check due to the fact that it has changed during the backup process.

Thank you for this. I cant exclude the docker.img however as it is in the appdata folder and not in its own folder within the appdata folder. I'll change this and i'm sure ill be able to exclude it then. 

Link to comment
28 minutes ago, tazire said:

Thank you for this. I cant exclude the docker.img however as it is in the appdata folder and not in its own folder within the appdata folder. I'll change this and i'm sure ill be able to exclude it then. 

I think you can exclude files as well but I haven’t tested that.

 

Honestly I need to revise what I posted though. You can backup the docker image. A backup will be created but you will always get an error because the test fails and from the wording of the error I think that old backups won’t get deleted. I haven’t tested this either though.

  • Upvote 1
Link to comment

Just did a manual backup and all seem to go good, except it did not exclude the folders I specified.

 

Example: (All on one line separated by a comma with no space)

/mnt/user/appdata/Music-Lidarr/MediaCover/Albums/,

/mnt/user/appdata/Movies-Radarr/MediaCover/,

/mnt/user/appdata/TV-Sonarr/MediaCover/,

/mnt/user/appdata/Movies_4K-Radarr/MediaCover/,

/mnt/user/appdata/Standup-Radarr/MediaCover/

Link to comment

Hi @KluthR!

 

I just updated to your version and found a small bug. With multiple archives enabled, pressing "Abort" in the UI only stops the current archive being made and it continues to the next one.

 

I started the backup to see if everything was working and had to adjust something I forgot to change so I wanted to stop it. I had to press abort 5 times to cancel the whole backup process 😅

Link to comment

I went back to page 47, and I see no mention of this—possibly because everyone else is smarter than I am?  I've removed the old, installed the new one and went to verify all the settings in the plugin.  I'm greeted with this message right on top in bold red letters:

 

Quote

Source Must Be Specified
Source cannot be /mnt/user or /mnt/disk

 

So, the previous version I was backing up to /mnt/user/CommunityApplicationsAppdataBackup without one single issue.  Two part question (A) why the change?  (B) where in the heck am I supposed to back up the appdata to now?

 

Thanks.

Link to comment
54 minutes ago, CoZ said:

I went back to page 47, and I see no mention of this—possibly because everyone else is smarter than I am?  I've removed the old, installed the new one and went to verify all the settings in the plugin.  I'm greeted with this message right on top in bold red letters:

 

 

So, the previous version I was backing up to /mnt/user/CommunityApplicationsAppdataBackup without one single issue.  Two part question (A) why the change?  (B) where in the heck am I supposed to back up the appdata to now?

 

Thanks.

Your quote is for the source not the destination.

  • Like 1
Link to comment

Is this correct syntax for Exclude Folders? Do I need to escape the spaces in the path or use quotes? Thanks!

 

/mnt/user/appdata/PlexMediaServer/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/,/mnt/user/appdata/PlexMediaServer/Library/Application Support/Plex Media Server/Metadata/

Link to comment
On 12/8/2022 at 7:42 AM, wgstarks said:

The default location for the docker image would be /mnt/cache/docker.img but if you want it to be in appdata you can just exclude it from the backups. If you already have other exclusions set just enter it as ,/mnt/cache/appdata/docker.img (note the comma at the beginning).

Thanks @wgstarks! That was exactly the issue I ran into, and this cleared it up.

 

Cheers.

Link to comment
  • Squid locked this topic
Guest
This topic is now closed to further replies.