04-25-2018 06:45 AM
Hello.
I'm having a hard time getting my bpbackup command to work correctly with an old database that has spaces in its name.
Here's the command structures I tried:
bpbackup -p policy_name -s User g:\MSSQL\Backups\Database Name\LOG\Database Name_LOG.trn
This is when I first encountered the issue as it tried to back-up the first "chunk" of the file path (until it hita space), then it would try to back-up the next chunk, and so forth. Of course it would fail to find the file each time.
I went through the documentation for bpbackup and I tried adding the "file length" before the path as follows:
bpbackup -p policy_name -s User 56 g:\...\Database Name\LOG\Database Name_LOG.trn
The same issue happens when including the file path lenght.
I'm not sure if the filepathlength filepath format is only supposed to used in file lists? Is this the work around for backing up a database that has spaces in it's name?
Thanks in advance!
Solved! Go to Solution.
04-25-2018 07:13 AM
Put your path in quotes: "G:\path with spaces in it". As in any CLI, spaces break up the command line into separate parameters.
04-25-2018 07:16 AM
Hello,
try this:
bpbackup -p test_windows -s User_1h "g:\MSSQL\Backups\Database Name\LOG\Database Name_LOG.trn"
P.S. the subject is confusing, the fact that the path is related to a database has no relevance here.
Michal
04-25-2018 07:13 AM
Put your path in quotes: "G:\path with spaces in it". As in any CLI, spaces break up the command line into separate parameters.
04-25-2018 07:16 AM
Hello,
try this:
bpbackup -p test_windows -s User_1h "g:\MSSQL\Backups\Database Name\LOG\Database Name_LOG.trn"
P.S. the subject is confusing, the fact that the path is related to a database has no relevance here.
Michal