Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path with spaces does not work #61

Closed
snupple opened this issue Jun 28, 2022 · 4 comments
Closed

Path with spaces does not work #61

snupple opened this issue Jun 28, 2022 · 4 comments
Assignees
Labels
not an issue Not a bug

Comments

@snupple
Copy link

snupple commented Jun 28, 2022

Hi, in my config file I have this:

"BackupRootDir": {
        "_meta": {
            "default": "$PSScriptRoot"
        },
        "value": "C:\\Users\\Rick\\OneDrive\\Backup Settings\\Plex"
    },

.. but it appears the space caused the script to not work, as soon as I remove the space it works..

How do I define this correctly?

@alekdavis
Copy link
Owner

alekdavis commented Jun 28, 2022

What is the error you're getting? Could you post the log file?

@alekdavis alekdavis self-assigned this Jun 28, 2022
@snupple
Copy link
Author

snupple commented Jun 28, 2022

So there is no runtime error, but this is what the log looks like:

PlexBackup v2.1.2 (c) Alek Davis
Script started at:
  06/29/2022 07:51:47
Logging configuration:
  {"Initialized":true,"LogLevel":"Debug","Console":false,"File":true,"ErrorFile":true,"FilePath":"C:\\Users\\Rick\\OneDrive\\Backup Settings\\Plex\\20220629075147\\Backup.log","ErrorFilePath":"Errorlog.txt","Backup":true,"Overwrite":false,"Append":false,"WithLogLevel":{"IsPresent":false},"WithTimestamp":{"IsPresent":false},"TimestampFormat":"yyyy-MM-dd HH:mm:ss","UtcTime":false,"TabSize":2,"BackgroundColor":null,"ForegroundColor":null}
Operation mode:
  BACKUP
Backup type:
  DEFAULT
Plex version:
  1.27.1.5916
Log file:
  C:\Users\Rick\OneDrive\Backup Settings\Plex\20220629075147\Backup.log
Error log file:
  Errorlog.txt
Stopping Plex services:
  Plex Update Service
Stopping Plex Media Server process:
  Plex Media Server.exe
Backup will be saved in:
  C:\Users\Rick\OneDrive\Backup Settings\Plex\20220629075147
Deleting old backup folder(s):
  20220628205409
**Cannot delete folder 'C:\Users\Rick\OneDrive\Backup Settings\Plex\20220628205409.
Cannot bind argument to parameter 'Path' because it is an empty string.**
Starting Plex services:
  Plex Update Service
Starting Plex Media Server:
  C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe
C**annot bind argument to parameter 'Path' because it is an empty string.**

@alekdavis
Copy link
Owner

alekdavis commented Jun 29, 2022

Okay, I do not normally use backup folders with spaces, but I tested it now and it all worked fine for me. No issues with spaces, so it looks like red herring.

I may be wrong, but I think the issue is with the fact that you are backing up to a folder under the OneDrive directory. The error occurs when the script attempts to delete old backup folder, but I suspect that the folder it tries to delete is not really there (it's a OneDrive feature that makes it look like the folder is there, but in fact, it's just a pointer and to get the folder content, you need to download the files from the cloud). If you manually download the folder contents via the Windows Explorer and try again, I assume it will work. Or remove the old backup folders from OneDrive, so they do not appear in the directory list.

Generally, I would not recommend backing up to OneDrive for a number of reasons, so I'd suggest using an external flash or hard drive. Does this make sense?

@alekdavis alekdavis added the not an issue Not a bug label Jun 29, 2022
@snupple
Copy link
Author

snupple commented Jun 29, 2022

OK, I understand - I'll work something out, like copying the files over to Onedrive after they are created in a batch file or similar.

Thansk for your speedy reply!

@snupple snupple closed this as completed Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not an issue Not a bug
Projects
None yet
Development

No branches or pull requests

2 participants