How to do Full cPanel Backup via SCP with spaces in remote directory path?

GasMan320

Member
Oct 2, 2012
7
0
1
cPanel Access Level
Root Administrator
I am trying to do a full cPanel backup on the site that I have hosted at Hostgator and have it transferred via Secure Copy (SCP) to a server I have at home but keep running into an issue with the path name of the remote directory where it needs to back up to.

The remote directory path I have is the following:

/volume1/Network Storage/Downloads/Family Backups/Complete cPanel Backups

and cPanel is able to make the backup correctly but then fails on transferring it to my remote server. It errors out and says that I need to check my username and password (which are definitely correct).

If I try backing up to a folder that has no spaces in its name, the backup is transferred properly.

How can I have cPanel's backup allow spaces in the folder path?

Thank you!
 

pwhjenny

Well-Known Member
Aug 31, 2012
138
0
91
cPanel Access Level
Root Administrator
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

The error might be originating because of space here /Family Backups . Did you make sure its correct path?
 

Raf

Registered
Mar 28, 2006
2
0
151
Philadelphia, PA
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

Have you tried escaping your spaces REMOTE_DIR=/volume1/Network\ Storage/Downloads/Family\ Backups/Complete\ cPanel Backups.

Alternatively you can try putting the entire path in quotes "/volume1/Network Storage/Downloads/Family Backups/Complete cPanel Backups"

--Raf
 

GasMan320

Member
Oct 2, 2012
7
0
1
cPanel Access Level
Root Administrator
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

The error might be originating because of space here /Family Backups . Did you make sure its correct path?
Yes, the path is correct. Out of curiosity, was there a reason you chose the space between Family and Backups rather than the other spaces in the path?

Have you tried escaping your spaces REMOTE_DIR=/volume1/Network\ Storage/Downloads/Family\ Backups/Complete\ cPanel Backups.

Alternatively you can try putting the entire path in quotes "/volume1/Network Storage/Downloads/Family Backups/Complete cPanel Backups"

--Raf
Backslashes (\) and quotations marks aren't allowed in the cPanel interface when inputting the Remote directory path. Any other ideas?

Or just rename the directories you're using for important backups to something without spaces. ;)
I appreciate you replying to my thread but is that workaround the only way of getting this to work? :( I have an existing directory structure which I'm not really able to modify.

Sorry for my late response -- I had set my account to instantly notify me via email of replies to this thread but for some reason I did not receive any in my inbox or spam folder.
 

Infopro

Well-Known Member
May 20, 2003
17,090
518
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

I appreciate you replying to my thread but is that workaround the only way of getting this to work? I have an existing directory structure which I'm not really able to modify.
I'm not sure why you'd want spaces in any directory name, or even image names. Or even capital letters! Makes no sense. You may not be able to modify whatever else you have going on, but surely it shouldn't be too much trouble to instead of using this:
/volume1/Network Storage/Downloads/Family Backups/Complete cPanel Backups

Use this:
/volume1/Network Storage/Downloads/Complete.cPanel.Backups

Or even this:
/volume1/Network Storage/Downloads/cpbackups

Move out the old backups, or leave them there, and create a new backup directory without spaces.


Spaces are not a good way to go. Sure, you might be able to find a way around them, but why go to the trouble?

If it was me, I'd just point the backups to a new directory, without spaces.
 

GasMan320

Member
Oct 2, 2012
7
0
1
cPanel Access Level
Root Administrator
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

I'm not sure why you'd want spaces in any directory name, or even image names. Or even capital letters! Makes no sense. You may not be able to modify whatever else you have going on, but surely it shouldn't be too much trouble to instead of using this:
/volume1/Network Storage/Downloads/Family Backups/Complete cPanel Backups

Use this:
/volume1/Network Storage/Downloads/Complete.cPanel.Backups

Or even this:
/volume1/Network Storage/Downloads/cpbackups

Move out the old backups, or leave them there, and create a new backup directory without spaces.


Spaces are not a good way to go. Sure, you might be able to find a way around them, but why go to the trouble?

If it was me, I'd just point the backups to a new directory, without spaces.
Would it even make a difference since the directory Network Storage still has a space in it?

Thanks!
 

Infopro

Well-Known Member
May 20, 2003
17,090
518
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

I missed that space, sorry. I'm sure this is something you need to do for some reason, and thats fine of course. If it was me, I'd sort this out properly, move what I needed to be moved and get it right. In fact, the titles themselves are all a bit long. Depending on how you work, what kind of computer you're on and what you're actually doing, you can run into problems with long paths and spaces in path as you now know.

I believe the maximum path length is 260 in Windows Vista, Windows 7 for example. This path:
/volume1/Network Storage/Downloads/Complete.cPanel.Backups

Is over 40 characters.

Food for thought I guess.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

This appears to have been discussed previously:

http://forums.cpanel.net/f5/ftp-directory-name-problems-spaces-115901.html

Using both escapes and quotes didn't work for the user. I searched for internal cases related to this and didn't find any. Could you please submit a bug report on this issue for us to reproduce it and determine if there is any current workaround? Cases are submitted via http://go.cpanel.net/bugs or using the link at the top of the forum.

Thanks!
 

GasMan320

Member
Oct 2, 2012
7
0
1
cPanel Access Level
Root Administrator
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

This appears to have been discussed previously:

http://forums.cpanel.net/f5/ftp-directory-name-problems-spaces-115901.html

Using both escapes and quotes didn't work for the user. I searched for internal cases related to this and didn't find any. Could you please submit a bug report on this issue for us to reproduce it and determine if there is any current workaround? Cases are submitted via http://go.cpanel.net/bugs or using the link at the top of the forum.

Thanks!
Thank you for responding Tristan. I was trying to fill out a support request but unfortunately I am just an end user at my webhost and don't have a "Support Access ID".

Is there any way I can still get support?

- - - Updated - - -

This appears to have been discussed previously:

http://forums.cpanel.net/f5/ftp-directory-name-problems-spaces-115901.html

Using both escapes and quotes didn't work for the user. I searched for internal cases related to this and didn't find any. Could you please submit a bug report on this issue for us to reproduce it and determine if there is any current workaround? Cases are submitted via http://go.cpanel.net/bugs or using the link at the top of the forum.

Thanks!
Thank you for responding Tristan. I was trying to fill out a support request but unfortunately I am just an end user at my webhost and don't have a "Support Access ID".

Is there any way I can still get support?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: How to do Full cPanel Backup via SCP with spaces in remote directory pa

I apologize that I didn't realize you were an end user on the machine with a cPanel account and without WHM or root administrator access.

Now, you should still be able to fill out a bug report without access to the machine entirely. We would need your cPanel login credentials in that instance and the other details such as the remote backup directory. Typically, you'll need to sign up for a support ticket system account, then log into that account, then try to submit the bug report.

If that doesn't work, then instead please contact your hosting provider to ask them to submit a bug report on the issue for you.