Git Product home page Git Product logo

Comments (12)

 avatar commented on July 19, 2024 1

Hello,
Iā€™m sorry I forget to update, worked like a charm !!
Thank you

from plexbackup.

MatthewGreen avatar MatthewGreen commented on July 19, 2024

I feel like the problem for me may be within your function DecompressPlexAppDataFolder. I see that, within Task Managed 7z.exe is running, has a PID and is using 800K of memory but it shouldn't get stuck on the codecs directory which is like ~2000Kb total.

try {
            if ($type -eq "7zip") {
                [Array]$cmdArgs

                if ($archiverOptionsExpand) {
                    foreach ($option in $archiverOptionsExpand) {
                        if ($option) {
                            $cmdArgs += $option
                        }
                    }
                }

                & $archiverPath "x" "$tempZipFilePath" "-o$plexAppDataDirPath" @cmdArgs

                if ($LASTEXITCODE -gt 0) {
                    throw ("7-zip returned: " + $LASTEXITCODE)
                }
            }
            else {
                Expand-Archive -Path $tempZipFilePath -DestinationPath $plexAppDataDirPath -Force
            }
        }
        catch {
            LogException $_

            return $false
        }

from plexbackup.

alekdavis avatar alekdavis commented on July 19, 2024

Hi, Matthew. Looks like I introduced a bug in the last update (I made 7-zip options configurable, but did not pass them to the subroutines), so it misses the overwrite without prompt switch and 7-zip just waits for the user to provide response to the invisible prompt. Anyway, try the latest version of the script I just checked in (v1.7.1). You can keep the same backup you created using v1.7.0. Let me know if it fixes the issue.

from plexbackup.

alekdavis avatar alekdavis commented on July 19, 2024

Forgot to mention. If you haven't killed the restore process, you may need to, unless you want to keep confirming the invisible 7-zip prompt (not even sure if it works). You may need to reboot the system once you do (in case single-instance mutex does not clear).

from plexbackup.

MatthewGreen avatar MatthewGreen commented on July 19, 2024

Alek thanks a lot! The fixes you made did fix the restore process. I was able to restore successfully. What's odd now though is that when I go to the Plex Web App, it doesn't actually have any of my libraries which is super odd.

from plexbackup.

MatthewGreen avatar MatthewGreen commented on July 19, 2024

I think I spoke too soon. While some folders like Coded unpacked, the Restore.log does show that 2\Media and 2\Metadata etc were unpacked but I don't see those folders appearing in the AppData\Local\Plex Media Server folder.

from plexbackup.

alekdavis avatar alekdavis commented on July 19, 2024

How big are your Media.7z and Metadata.7z files? Can you share the log sections showing them being processed?

from plexbackup.

MatthewGreen avatar MatthewGreen commented on July 19, 2024

The entire log is below. I had to manually unpack them using 7Zip. The Media (800 MB) and Metadata (2.00GB) were not unpacked.

Thanks for your help.

PlexBackup v1.7.1 (c) 2020 Alek Davis
Script started at:
  06/24/2020 23:42:18
Operation mode:
  RESTORE
Backup type:
  7ZIP
Log file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\Restore.log
Error log file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\Restore.err.log
Plex Media Server version (CURRENT):
  1.19.4.2935
Plex Media Server version (BACKUP):
  1.19.4.2935
Stopping Plex service(s):
  Plex Update Service
Stopping Plex Media Server process:
  Plex Media Server.exe
Restoring Plex app data folders from:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2
Copying backup archive file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2\Codecs.7z
to a temp zip file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-47a1387a-de0e-46b0-9e7c-5efff4798b95.7z
at:
  2020/06/24 23:42:23.365
Completed at:
  2020/06/24 23:42:23.708
Restoring Plex app data from:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-47a1387a-de0e-46b0-9e7c-5efff4798b95.7z
to Plex app data folder:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Codecs
at:
  2020/06/24 23:42:23.731
Completed at:
  2020/06/24 23:42:23.792
Deleting temp file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-47a1387a-de0e-46b0-9e7c-5efff4798b95.7z
Copying backup archive file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2\Media.7z
to a temp zip file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-1f8d0d5f-4bcb-4478-b932-d6f969151a97.7z
at:
  2020/06/24 23:42:23.821
Completed at:
  2020/06/24 23:42:29.387
Restoring Plex app data from:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-1f8d0d5f-4bcb-4478-b932-d6f969151a97.7z
to Plex app data folder:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Media
at:
  2020/06/24 23:42:29.416
Completed at:
  2020/06/24 23:42:29.592
Deleting temp file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-1f8d0d5f-4bcb-4478-b932-d6f969151a97.7z
Copying backup archive file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2\Metadata.7z
to a temp zip file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-4aea52e1-c30d-427e-a8ab-764473e33a48.7z
at:
  2020/06/24 23:42:29.671
Completed at:
  2020/06/24 23:42:45.149
Restoring Plex app data from:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-4aea52e1-c30d-427e-a8ab-764473e33a48.7z
to Plex app data folder:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Metadata
at:
  2020/06/24 23:42:45.170
Completed at:
  2020/06/24 23:42:45.526
Deleting temp file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-4aea52e1-c30d-427e-a8ab-764473e33a48.7z
Copying backup archive file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2\Plug-in Support.7z
to a temp zip file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-c3602593-5d6b-4043-b22d-1d9ceb750f25.7z
at:
  2020/06/24 23:42:45.659
Completed at:
  2020/06/24 23:42:56.276
Restoring Plex app data from:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-c3602593-5d6b-4043-b22d-1d9ceb750f25.7z
to Plex app data folder:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Plug-in Support
at:
  2020/06/24 23:42:56.297
Completed at:
  2020/06/24 23:42:56.327
Deleting temp file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-c3602593-5d6b-4043-b22d-1d9ceb750f25.7z
Copying backup archive file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2\Plug-ins.7z
to a temp zip file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-ced5fe1f-0e5a-4d04-86b1-3adba9147ec3.7z
at:
  2020/06/24 23:42:56.422
Completed at:
  2020/06/24 23:42:56.676
Restoring Plex app data from:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-ced5fe1f-0e5a-4d04-86b1-3adba9147ec3.7z
to Plex app data folder:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Plug-ins
at:
  2020/06/24 23:42:56.703
Completed at:
  2020/06/24 23:42:56.721
Deleting temp file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-ced5fe1f-0e5a-4d04-86b1-3adba9147ec3.7z
Copying backup archive file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2\Scanners.7z
to a temp zip file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-9f530693-b011-4d59-9a3e-7751ea51af70.7z
at:
  2020/06/24 23:42:56.751
Completed at:
  2020/06/24 23:42:57.001
Restoring Plex app data from:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-9f530693-b011-4d59-9a3e-7751ea51af70.7z
to Plex app data folder:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Scanners
at:
  2020/06/24 23:42:57.022
Completed at:
  2020/06/24 23:42:57.037
Deleting temp file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-9f530693-b011-4d59-9a3e-7751ea51af70.7z
Copying backup archive file:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\2\Thumbnails.7z
to a temp zip file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-7324f5e6-3edf-46ad-8d59-a3baf69e64ff.7z
at:
  2020/06/24 23:42:57.065
Completed at:
  2020/06/24 23:42:57.321
Restoring Plex app data from:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-7324f5e6-3edf-46ad-8d59-a3baf69e64ff.7z
to Plex app data folder:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Thumbnails
at:
  2020/06/24 23:42:57.364
Completed at:
  2020/06/24 23:42:57.380
Deleting temp file:
  C:\Users\USERNAME\AppData\Local\Temp\PlexBackup-7324f5e6-3edf-46ad-8d59-a3baf69e64ff.7z
Restoring special subfolders.
Copying folder:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\4\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
to:
  C:\Users\USERNAME\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
at:
  2020/06/24 23:42:57.435
Completed at:
  2020/06/24 23:42:57.471
Restoring Plex Windows registry key(s) from:
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\3\Plex1.reg
  \\NAS\NASPlexMedia\PlexPowershellBackups\20200624233010\3\Plex2.reg
Starting Plex service(s):
  Plex Update Service
Starting Plex Media Server process:
  C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe
Script ended at:
  2020/06/24 23:42:58.506
Script ran for (hr:min:sec.msec):
  00:00:40.274
Script returned:
  SUCCESS
Done.

from plexbackup.

alekdavis avatar alekdavis commented on July 19, 2024

Okay, now the problem was the -aoa 7-zip switch used for decompression. I wanted to load it from configuration settings, but can't figure out how to make it work, so I hard-coded it (as it used to be before I broke it). Tried it and it seems to be working. Get v1.7.2 and let me know if it helps.

from plexbackup.

 avatar commented on July 19, 2024

Hello !

Thank you for the new release, I have the same issue. I'll test the 1.7.2

from plexbackup.

alekdavis avatar alekdavis commented on July 19, 2024

Any luck? Problems?

from plexbackup.

alekdavis avatar alekdavis commented on July 19, 2024

Sweet. Thanks for the update. I'll close the issue then. Let me know if you run into anything else.

from plexbackup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.