Jump to content

[Plugin] Appdata.Backup


Recommended Posts

On 8/6/2024 at 1:37 AM, KluthR said:

The log shows, that verification fails due to files which shrank. Is anything outside plex accessing these files? I dont see anything on the docker side which uses the same path.

Depends. The files are accessed by another docker I use called Tautulli. I thought the backup processed stopped all dockers first, worked, and then turned them back on. If it is turning them off 1 at a time and Tautulli is still running, it does access static data in Plex's files.

Link to comment
1 hour ago, Mysteic said:

I thought the backup processed stopped all dockers first

Depends. I missed to check that on the log. Please review the backup-method setting. It controls the backup procedure.

  • Like 1
Link to comment

Random question for people that have done a RESTORE of their Plex Docker.

By excluding the Cache, Media, and Metadata folders from your backup - did your Collections and Plex settings also restore correctly? 

I have a lot of Collections created and sorting out which folders to exclude from the backup to reduce the save file size.

Link to comment

I noticed that when the back is created, it creates a new user share each time. Is there a way for it to just store the backup in the destination without creating a user share? Or is the share necessary for the restore process to work? I just find it clutters up my User share tab with all the backup folders. Also every share that is created, has primary storage set to Array even if the destination is a my single drive pool with a 2TB SSD drive. I just dont want the backups to be stored on the Array

Link to comment
Just now, saitoh183 said:

I noticed that when the back is created, it creates a new user share each time.

No, it does not. If you create a folder inside the array or pool, unraid think it a user share an list it. Change the destination so it points in a folder inside a share. (One level deeper)

Link to comment

Heyho,

 

i have a bunch of appdata folders that will not get backed up.

Debug shows no real error. I think its realy simple, but i have no idea were to look at. 

permissions are set...

 

one container as example ... HELP :D!?!

 

[10.08.2024 22:49:45][debug][sonarr] Generated tar command: --exclude '/mnt' --exclude '/mnt/user/local/download' --exclude '/mnt/user/local/google/Media' -c -P -I "zstd -T8" -f '/mnt/user/backup/ab_20240810_224913/sonarr.tar.zst' '/mnt/user/appdata/sonarr'
[10.08.2024 22:49:45][ℹ️][sonarr] Backing up sonarr...
[10.08.2024 22:49:45][debug][sonarr] Tar out: 
[10.08.2024 22:49:45][ℹ️][sonarr] Backup created without issues
[10.08.2024 22:49:45][ℹ️][sonarr] Verifying backup...
[10.08.2024 22:49:45][debug][sonarr] Final verify command: --exclude '/mnt' --exclude '/mnt/user/local/download' --exclude '/mnt/user/local/google/Media' --diff -f '/mnt/user/backup/ab_20240810_224913/sonarr.tar.zst' '/mnt/user/appdata/sonarr'
[10.08.2024 22:49:45][debug][sonarr] Tar out: tar: /mnt/user/appdata/sonarr: Not found in archive; tar: Exiting with failure status due to previous errors
[10.08.2024 22:49:45][][sonarr] tar verification failed! Tar said: tar: /mnt/user/appdata/sonarr: Not found in archive; tar: Exiting with failure status due to previous errors
[10.08.2024 22:49:51][debug][sonarr] lsof(/mnt/user/appdata/sonarr)

 

Link to comment
On 8/8/2024 at 9:07 AM, TallMan206 said:

Does this app keep the permissions intact after restore?

In my case: Immich with the PostgreSQL_Immich Database. The DB has 999 as user, I backup Immich and the DB, and will the DB still work after restore, keeping the permissions intact?

Yes. I just had to restore this appdata as it somehow lost a pile of folders on a server crash. 999 user remains along with the correct user permissions for files/folders. 

  • Thanks 1
Link to comment

I am curious if there are any plans to release the "per container" script option with the next release of the plugin. Long story short, I edited the code myself to create this option, but it would be nice to see this built-in.

 

The reason being, I wrote a custom script for the plugin that I want to share on GitHub. As a "per-container" script, it creates ZFS snapshots of docker containers while they are stopped by the plugin, and then as a "post-run" script, it will optionally create ZFS replications and optionally create tar files from a temporary cloned dataset of the most recent snapshots that were just taken (allows tar backups while dockers are running). Rather than suggest that the user have to edit the PHP files, perhaps it's best I just wait for the feature to be added to the plugin first if it is just around the corner, otherwise I suppose I'll just release the custom script as is. Thanks!

Link to comment

Create a PR. Seems ok except the variable starts with an uppercase „C“. 😅

 

apart from that the changes look good.

 

I also want to play with ZFS snapshots but time is still limited. Ill do my best to continue work later.

Link to comment

That sounds good then, I will change the variable name and create a PR. Before I do, I currently have the per-container script immediately *before* the tarfile is created, but perhaps it would be better served immediately *after* the tarfile is created? It is irrelevant in terms of the zfs snapshots, but perhaps there is more usefulness for other custom scripts after the tarfile is created. There could always be multiple "per-container" script options, but that is perhaps a bit overkill.

Link to comment

Hi,

I think I'm missing something.

Installed and backed-up yesterday, several times.

I just tried to restore Nginx but it didn't happen, although I saw an approval for succesful operation.

 

It'd seem that it got restored in the wrong place/path ( as says debug log: )

[12.08.2024 22:25:24][debug][Main] Final tar command: tar -C '/mnt/user/Private/appdata-backup/' -x -f '/mnt/user/Private/appdata-backup/ab_20240811_113818/Nginx-Proxy-Manager-Official.tar.gz' -z

( it restores into the "backup destination" folder, not into the "original" folder )

Did I miss a setting?

 

 

EDIT:

geee foolish me!

I selected the "source" folder in the field of the destination 🤦‍♂️

Edited by NetanHell
Link to comment

I am a bit confused on the settings surrounding "member of group".  It shows up for me as this:

image.png.6e225efd09564631c1d7c1e9202f2f04.png

 

However, it doesn't matter how many times I click, no "list" of groups pops up for me to select.  My backup type is set correctly "Stop, backup, start each container"  Do I have to type each docker in?  Is that a valid workaround?  It'd be nice to have a list pop up that allows me to group but not sure if my app is bugged.

 

Thanks.

Link to comment

I went ahead and did the pull requests on GitHub. I did three pull requests, one for each file changed, as I have not done a pull request before, and I did not realize that I could have just done one pull request. It was a learning experience, I know now.

 

To keep with the "pre/post script" theme, I added two custom script options. One for running a script before a container backup, and one for just after a container backup. In hindsight, a 'true|false' for the 'Post-container-backup script' would have been consistent with the other post-backup option. In any case, I look forward to seeing any type of "per-container" script that ends up in a future release. Thanks!

 

appdata.backup_zfs_script_002.thumb.png.5e094d67c8da25c0861135ba63bf48cc.png

Link to comment
On 8/7/2024 at 11:48 PM, KluthR said:

Depends. I missed to check that on the log. Please review the backup-method setting. It controls the backup procedure.

I guess I glossed over the fact that option was reset after an update. I believe the one where it advised to remove and reinstall the app due to a change. Can't test it right now, but I am pretty confident that is going to be the fix. Thanks.

Edited by Mysteic
Link to comment
12 hours ago, KluthR said:

If first time group, just type some groupname in and save. Then the list becomes available

Thanks for this.  I was thinking a list of all the Dockers would pop up and I would select the ones that I want to be part of the group. What you provided obviously works and makes sense.  Thanks for the response!

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...