Open naddel91 opened 1 day ago
value
properties, not to the default
properties under the _meta
element (these just show what the default values are). So, just move values from lines 23 and 29 to lines 25 and 30 (replace null
values with your values).$PSVersionTable
and it will show the version. If you are using version 7, then it's probably the reason. It did not work for me and I did not have time to port the script to PowerShell 7 (it's on the todo list, but no promises at this point)thanks for your help. still nothing:
$PSVersionTable says 5.1
I think you have a typo in the BackupRootDir
setting (unless you intentionally called the folder Backu
).
That's not how you run PowerShell scripts. First, move the PlexBackup.ps1
file somewhere to a dedicated directory, so it is not mingled with other application or data files. I would recommend creating a separate folder. If you insist on using the K drive, just go to the root of the K drive and create a PlexBackup
folder and move the PlexBackup.ps1
and PlexBackup.ps1.json
files there. Then from PowerShell command prompt, switch to this folder so it is your active directory and enter .\PlexBackup.ps1
. This should work.
P:\Backu is intentional. My P-Key did hang when I created that folder. So I named it that in the script. ".\PlexBackup.ps1" or ".\PlexBackup.ps"?
Sorry, ps1
. It was my typo.
Do you have 7zip installed?
yes, and set to PATH as well.
Did you specify the path to the 7zip EXE in the in the config file?
"}, "Type": { "_meta": { "set": ",7zip,Robocopy", "default": """
here?
No, under:
"ArchiverPath": {
"_meta": {
"default": "$env:ProgramFiles\\7-Zip\\7z.exe"
},
"value": ""HERE!!!"
},
I have the default dir, so no value needed, right?
The .exe file is definetely there!
If it's the default installation dir, then, no, not needed (and if you specify it, it must include the exe file). But the log indicates that it fails to archive the first (Cache
) directory (I assume you have no files to archive under the root folder, which is normally the case). So, normally, 7zip should provide some info why it failed, but in your case, I see nothing. So, it's really weird. I would run it with the -Verbose
switch to see if there is any additional info. You can also try the default archiver (do not use the switch to indicate 7zip compression) and see if it does better. If I ran into this problem, I would add a log statement before line 2992 and print out the command the script uses and try to run it manually. Or try compressing the cache folder via 7zip by hand.
can I leave out cache folder? I thought it would be excluded by default?
According to your screenshot, 7-zip path should be under C:\Programme\7-zip\7z.exe
, not under C:\Program Files\7-zip\7z.exe
. But I suspect it would not matter (since the default did not cause this error).
You can exclude the Cache
folder, but it is important: it stores all of you custom configurations. You can exclude it as a troubleshooting step (to see if it may be locked or something), but I would not exclude it for normal operation.
ok, will backup with "-verbose" and report back tomorrow. thanks for your time.
OK. Also, run it with the -RawOutput
switch. Maybe it will give us additional info from 7zip.
thanks for your script. but I cannot make it work. it does not execute after powershell command it entered. is it due to my custom folders?