Comments (14)
@alekdavis Looks to all be good now on the latest release! No errors or any other problems at all. :D
Going to go ahead and close this issue now, due to the fact that this is now solved.
from plexbackup.
@JourneyOver : Hmmm... this is weird. I assume that the folder (path) exists (since your backup does seem to get generated). And it should not be a permissions issue. Could you replace the contents of the try-catch
block starting at like 676 with this:
try {
if (!(Test-Path -Path $$path -PathType Leaf)) {
New-Item -Path $path -Type file -Force
}
$version | Set-Content -Path $path
}
catch {
and see if it helps?
from plexbackup.
Well the error didn't show up this time but now it just shows
Plex Media Server version (CURRENT):
1.15.6.1079
Directory: H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 5/18/2019 1:02 PM 0 version.txt
but it still is not created at all.
I just noticed something as well that may be a clue as to what's maybe happening, look at the log
PlexBackup v1.5.7 (c) 2019 Alek Davis
Script started at:
05/18/2019 13:02:10
Operation mode:
BACKUP
Backup type:
7ZIP
Log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackup.log
Error log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackupError.log
Plex Media Server version (CURRENT):
1.15.6.1079
Stopping Plex service(s):
Plex Update Service
Stopping Plex Media Server process:
Plex Media Server.exe
Backup will be saved in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210
Deleting old backup folder(s):
20190518130210
20190518114319
Creating backup folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210
Creating task-specific subfolder(s) in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210
Backing up special subfolders.
Moving folder:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\3\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
at:
2019/05/18 13:02:15.119
Completed at:
2019/05/18 13:02:15.288
Backing up Plex app data folders from:
C:\Users\JourneyOver\AppData\Local\Plex Media Server
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\1
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Codecs
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\1\Codecs.7z
at:
2019/05/18 13:02:15.446
Completed at:
2019/05/18 13:02:16.533
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Media
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\1\Media.7z
at:
2019/05/18 13:02:16.609
Completed at:
2019/05/18 13:02:49.538
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Metadata
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\1\Metadata.7z
at:
2019/05/18 13:02:49.608
Completed at:
2019/05/18 13:03:51.357
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\1\Plug-in Support.7z
at:
2019/05/18 13:03:51.429
Completed at:
2019/05/18 13:05:01.278
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-ins
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\1\Plug-ins.7z
at:
2019/05/18 13:05:01.345
Completed at:
2019/05/18 13:05:32.916
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Scanners
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\1\Scanners.7z
at:
2019/05/18 13:05:32.984
Completed at:
2019/05/18 13:05:33.061
Backing up registry key:
HKCU\Software\Plex, Inc.\Plex Media Server
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\2\Plex.reg
Restoring special subfolders.
Copying folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210\3\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
to:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
at:
2019/05/18 13:05:33.255
Completed at:
2019/05/18 13:05:33.301
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:
2019/05/18 13:05:34.064
Script ran for (hr:min:sec.msec):
00:03:23.287
Script returned:
SUCCESS
Done.
and you'll notice something as well, though I'll make it a bit more clear below on what seems to be happening, and it all seems to be due to the fact that I have my keep value for backups set to only "1"
What you should see is that it starts up and creates the folder and the version.txt file
PlexBackup v1.5.7 (c) 2019 Alek Davis
Script started at:
05/18/2019 13:02:10
Operation mode:
BACKUP
Backup type:
7ZIP
Log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackup.log
Error log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackupError.log
Plex Media Server version (CURRENT):
1.15.6.1079
Stopping Plex service(s):
Plex Update Service
Stopping Plex Media Server process:
Plex Media Server.exe
Backup will be saved in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210
but then the next thing you see is that since I have my keep value for backups set to only 1 it deletes my old backup along with the new folder it just created that had the version.txt in it.
Deleting old backup folder(s):
20190518130210
20190518114319
after that it goes and recreates the folder all over again and continues on with the update like nothing ever happened, except for the fact that the folder with the version.txt info was deleted so it ends up missing it in the new folder.
Creating backup folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210
Creating task-specific subfolder(s) in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518130210
...
...
so it's all due to the fact that it creates the new backup folder along with the version.txt file all before doing the deletion process of the old backups which causes it to delete the folder for the new backup as well due to the fact I only want to keep 1 backup, which then gets recreated (minus the version.txt) when it goes about doing the actual backup process.
from plexbackup.
@JourneyOver : Good bug tracking skills. :-) I see what's happening now.
from plexbackup.
Try this one (remove the .TXT extension):
PlexBackup.ps1.TXT
from plexbackup.
@JourneyOver : Let me know if it fixes the problem.
from plexbackup.
Looks like it creates the version.txt file now, but it now seems to throw some random errors and it seems to even throw a security warning now as well >.<
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust
this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run
C:\Users\JourneyOver\Desktop\Github\Backup-Scripts\PlexBackup\PlexBackup.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R
Get-Help : Get-Help could not find C:\Users\JourneyOver\Desktop\Github\Backup-Scripts\PlexBackup\PlexBackup.ps1 in a help file in this
session. To download updated help topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at
https:/go.microsoft.com/fwlink/?LinkID=107116.
At C:\Users\JourneyOver\Documents\WindowsPowerShell\Modules\ScriptVersion\1.0.0\ScriptVersion.psm1:82 char:19
+ $notesText = (Get-Help -Full $ScriptPath).alertSet.alert.Text
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
PlexBackup v
Script started at:
05/18/2019 13:44:26
Validating log file folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS
Get-Help : Get-Help could not find C:\Users\JourneyOver\Desktop\Github\Backup-Scripts\PlexBackup\PlexBackup.ps1 in a help file in this
session. To download updated help topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at
https:/go.microsoft.com/fwlink/?LinkID=107116.
At C:\Users\JourneyOver\Documents\WindowsPowerShell\Modules\ScriptVersion\1.0.0\ScriptVersion.psm1:82 char:19
+ $notesText = (Get-Help -Full $ScriptPath).alertSet.alert.Text
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
Operation mode:
BACKUP
Backup type:
7ZIP
Log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackup.log
Error log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackupError.log
Plex Media Server version (CURRENT):
1.15.6.1079
Stopping Plex service(s):
Plex Update Service
Stopping Plex Media Server process:
Plex Media Server.exe
Backup will be saved in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426
Deleting old backup folder(s):
20190518130925
20190518130210
Creating backup folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426
Creating task-specific subfolder(s) in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426
Backing up special subfolders.
Moving folder:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\3\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
at:
2019/05/18 13:44:44.674
Completed at:
2019/05/18 13:44:44.848
Backing up Plex app data folders from:
C:\Users\JourneyOver\AppData\Local\Plex Media Server
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\1
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Codecs
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\1\Codecs.7z
at:
2019/05/18 13:44:45.030
Completed at:
2019/05/18 13:44:46.740
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Media
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\1\Media.7z
at:
2019/05/18 13:44:46.846
Completed at:
2019/05/18 13:45:19.244
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Metadata
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\1\Metadata.7z
at:
2019/05/18 13:45:19.339
Completed at:
2019/05/18 13:46:23.747
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\1\Plug-in Support.7z
at:
2019/05/18 13:46:23.840
Completed at:
2019/05/18 13:47:40.545
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-ins
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\1\Plug-ins.7z
at:
2019/05/18 13:47:40.639
Completed at:
2019/05/18 13:48:33.731
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Scanners
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\1\Scanners.7z
at:
2019/05/18 13:48:33.815
Completed at:
2019/05/18 13:48:33.916
Backing up registry key:
HKCU\Software\Plex, Inc.\Plex Media Server
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\2\Plex.reg
Restoring special subfolders.
Copying folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\3\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
to:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
at:
2019/05/18 13:48:34.175
Completed at:
2019/05/18 13:48:34.227
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:
2019/05/18 13:48:35.007
Script ran for (hr:min:sec.msec):
00:04:08.626
Script returned:
SUCCESS
C:\Users\JourneyOver\Desktop\Github\Backup-Scripts\PlexBackup\PlexBackup.ps1 : Cannot validate argument on parameter 'success'. The argument
"H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518134426\version.txt" does not belong to the set ",True,False" specified by the
ValidateSet attribute. Supply an argument that is in the set and then try the command again.
At line:1 char:1
+ ./PlexBackup.ps1 -ConfigFile 'PlexBackup.Backup.json'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [PlexBackup.ps1], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,PlexBackup.ps1
Didn't throw the security warning or those random errors before...
from plexbackup.
The security warning is because you downloaded the file from the internet. Just make an undestructive change and save the file, and PowerShell should stop complaining. I need to go run errands now, but I'll get back to it when I get a chance. Will let you know.
from plexbackup.
Yea I was about to edit my post above to say it could probably actually be ignored due to that fact xD as well as the "Get-Help could not find" errors, the only one that would really need to be looked at is the very last error to do with the "Cannot validate argument on parameter 'success'."
and alright have a good day ^^
from plexbackup.
Okay, I think I fixed it.
PlexBackup.ps1.TXT
from plexbackup.
Wait. I'm getting another error when using Keep=1. Will get to it later.
from plexbackup.
Probably because you forgot to encase it in ""
like "1"
, should be Keep = "1"
Testing it out right now, will report back in a few minutes once it's done.
from plexbackup.
@alekdavis looks like everything ran perfectly, no errors or anything bad going on and it creates the version.txt file like it should without it being deleted (only thing is it doesn't mention anything in the actual output that it's being created lol) xD
PlexBackup v1.5.7 (c) 2019 Alek Davis
Script started at:
05/18/2019 15:23:47
Operation mode:
BACKUP
Backup type:
7ZIP
Log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackup.log
Error log file:
H:\Ketarin\ketarin-files\installers\Backups\PMS\PlexBackupError.log
Plex Media Server version (CURRENT):
1.15.6.1079
Stopping Plex Media Server process:
Plex Media Server.exe
Backup will be saved in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347
Deleting old backup folder(s):
20190518135719
Creating backup folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347
Creating task-specific subfolder(s) in:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347
Backing up special subfolders.
Moving folder:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\3\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
at:
2019/05/18 15:23:51.209
Completed at:
2019/05/18 15:23:51.379
Backing up Plex app data folders from:
C:\Users\JourneyOver\AppData\Local\Plex Media Server
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\1
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Codecs
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\1\Codecs.7z
at:
2019/05/18 15:23:51.526
Completed at:
2019/05/18 15:23:52.726
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Media
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\1\Media.7z
at:
2019/05/18 15:23:52.792
Completed at:
2019/05/18 15:24:26.009
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Metadata
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\1\Metadata.7z
at:
2019/05/18 15:24:26.095
Completed at:
2019/05/18 15:25:33.735
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\1\Plug-in Support.7z
at:
2019/05/18 15:25:33.803
Completed at:
2019/05/18 15:26:48.471
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-ins
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\1\Plug-ins.7z
at:
2019/05/18 15:26:48.540
Completed at:
2019/05/18 15:27:23.197
Archiving:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Scanners
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\1\Scanners.7z
at:
2019/05/18 15:27:23.264
Completed at:
2019/05/18 15:27:23.337
Backing up registry key:
HKCU\Software\Plex, Inc.\Plex Media Server
to:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\2\Plex.reg
Restoring special subfolders.
Copying folder:
H:\Ketarin\ketarin-files\installers\Backups\PMS\20190518152347\3\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
to:
C:\Users\JourneyOver\AppData\Local\Plex Media Server\Plug-in Support\Data\com.plexapp.system\DataItems\Deactivated
at:
2019/05/18 15:27:23.555
Completed at:
2019/05/18 15:27:23.599
Starting Plex Media Server process:
C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe
Script ended at:
2019/05/18 15:27:24.327
Script ran for (hr:min:sec.msec):
00:03:37.297
Script returned:
SUCCESS
Done.
That's using this version #14 (comment)
from plexbackup.
Okay, seems to be working with no errors now. Check the latest release. Let me know.
from plexbackup.
Related Issues (20)
- issue with backup HOT 5
- Cannot import run-time settings from default configuration file (if any). Invalid JSON primitive: Skip. HOT 1
- Validation error. Backup version does not match HOT 3
- Can't start Plex after backup HOT 6
- After backup completes getting an error when the script attempts to start Plex HOT 3
- Plex Media Server Not Restarting HOT 1
- Email Notification Not Working HOT 2
- Plex Backup Failing-Nothing Changed HOT 16
- question/enhancement HOT 4
- Only receiving the error "Error processing dependencies. You cannot call a method on a null-valued expression." HOT 6
- Fix typo in log message HOT 1
- Add support for PowerShell 7.
- RUNAS ERROR: Unable to run ... 87: The parameter is incorrect. HOT 2
- Plex Backup Fails Through Task Scheduler (Win 10 Pro) HOT 2
- 87: The parameter is incorrect HOT 13
- Create a workaround for the error 87: The parameter is incorrect HOT 1
- Restore didn
- Restore didn't work too well for me HOT 16
- Sub folders not being created by backup process HOT 5
- Add the option to exclude Cache folder HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plexbackup.