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.

CLI to Selectively Restore Appdata Folder from CA-Appdata .TAR?

Featured Replies

I've been having a hell of a time trying to get my Plex installation fixed, after almost certainly corrupting the database, possibly by accidentally filling the cache SSD where appdata also lives.

 

I've had some help already (from @trurl , @TexasUnraid, and @Energen), first in the linuxserver.io Plex Docker forum, and then in the binhex Krusader forum, but I think what I'm doing now isn't related to those Dockers, specifically.

 

I think I want to do the following, and need help:

1. Delete the existing, non-working data from the appdata/Plex folder, which by now must be a mess of overlapping half-assed recovery attempts. (I've tried restoring a couple of times, and can get Plex running, but either it says it can't find my server, or assumes I'm starting from scratch.)

2. Restore just the Plex data from a recent CA Backup .tar file...

2a. ...preferably directly to the now-empty appdata/Plex folder.

3. Make sure all the newly-restored data has the correct permissions (rwx) so the Docker can use it properly. (I manually extracted the folder using the CLI/console, but copied it to a new directory under appdata using Krusader, and it arrived with permissions as 'r–x'.)

4. Make sure that the Docker is looking at the correct location (/mnt/user/appdata/Plex or /mnt/cache/appdata/Plex, whichever it's supposed to be).

 

@Energen sorted out Step 2 (quoted below), but I'd appreciate some help with Steps 1, 2a, 3, and 4... please. 

 

Quote

 

...extract manually from a console window.  It's just like working on a Windows command line.

 

cd /mnt/user/appdata/backups  --- or wherever your backup file is

tar -xvf CA_backup.tar <name of folder> --- this will extract only the folder you want.. it's case sensitive (as is everything in linux) so Plex and plex would be two different folders.  It's got to be exactly what the name of your folder is.

 

This will extract it in the same directory as your backup file.

 

 

Oh man.. where to start...

 

23 hours ago, Karyudo said:

1. Delete the existing, non-working data from the appdata/Plex folder

Go to a console window, and "cd /mnt/user/appdata/"  then "rm -r Plex" or whatever your Plex folder is named.

 

That will delete the directory... good bye.

 

Quote

 


2. Restore just the Plex data from a recent CA Backup .tar file...

2a. ...preferably directly to the now-empty appdata/Plex folder.
 

 

 

Using the same type of command, should be something like "tar -xvf -C /mnt/user/appdata/Plex CA_backup.tar <name of folder>"

It would be less error prone to copy the backup file to appdata first and then use the first command on it there.

 

Quote

3. Make sure all the newly-restored data has the correct permissions (rwx) so the Docker can use it properly. (I manually extracted the folder using the CLI/console, but copied it to a new directory under appdata using Krusader, and it arrived with permissions as 'r–x'.)

 

I believe this is what the Docker Safe New Perms option is for in the unraid gui on the tools screen.  It's supposed to reset all permissions.

Alternatively you can manually do it from a console window.  "chmod -R 777 /mnt/user/appdata/Plex"

 

Quote

4. Make sure that the Docker is looking at the correct location (/mnt/user/appdata/Plex or /mnt/cache/appdata/Plex, whichever it's supposed to be).

 

Your Plex docker configuration should have /config pointed to the correct location.

/config : /mnt/user/appdata/Plex

 

Whether or not it's on the cache drive is determined by your appdata share settings.

 

You should probably just forget about your backup files and let Plex rebuild everything for you.... you've done a real head slapper on all of these files :P

 

Edited by Energen

Well hell, my entire reply is gone... that's no good...

1 hour ago, Energen said:

Well hell, my entire reply is gone... that's no good...

Not gone, apparently you hit the wrong button.

Now it's back... am I crazy?! I was quite tired when I thought I hit submit.... lol... was it stuck in the void somewhere? I'm just going nuts now.

  • Author
10 minutes ago, Energen said:

Now it's back... am I crazy?! I was quite tired when I thought I hit submit.... lol... was it stuck in the void somewhere? I'm just going nuts now.

When I first looked, I didn't see your help post, and only saw your "it's gone" post. The next time I looked, it was there, before the "it's gone" post. So you're not nuts!

 

My favourite tangentially-related quote from Jerry Seinfeld (as related by Penn Jillette) is, "All magic is, 'Here’s a quarter, now it’s gone. You’re a jerk. Now it’s back. You’re an idiot. Show’s over.'"

 

(BTW, I'm on Step 2 (and hopefully 2a) of the procedure above.) 

Edited by Karyudo

  • Author

Ha! For the purposes of this thread, I will assume the role of both jerk and idiot.

 

EDIT: Good news! I believe I have successfully restored my Plex installation from my August 3 backup. Looks fine with the WebUI; Tautulli says "nothing being played"; I can play files. The 'activity' icon is circling, which worries me just a bit, and I got a 'server unreachable' message for a brief time, but I imagine it's churning its way through over a week of new media...?

Edited by Karyudo

  • Author

One thing missing after the restore from backup: shared libraries for users. All the users are still listed, but the libraries they should have shared with them are missing. Hmm.

On 8/10/2020 at 8:53 PM, Energen said:

I believe this is what the Docker Safe New Perms option is for in the unraid gui on the tools screen.  It's supposed to reset all permissions.

Alternatively you can manually do it from a console window.  "chmod -R 777 /mnt/user/appdata/Plex"

God no.  What docker safe new perms does is specifically exclude appdata from any changes to permissions / ownership.  Docker containers may have their own unique and specific ownership / permission requirements, and messing around with them may impact your ability to run those applications (or have undesired side effects)

 

  • Author

Good to know this detail on appdata permissions. Thankfully, I didn't have to think about or mess with permissions: the files were restored from the backup as rwx, just as one would hope.

Archived

This topic is now archived and is closed to further replies.

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.