Backup Strategy Not Working (Solved Apparently)

Robert Heller heller at deepsoft.com
Sat Aug 1 20:13:18 UTC 2015


At Sat, 01 Aug 2015 20:43:48 +0100 "Ubuntu user technical support,  not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> On 01/08/15 19:49, Graham Watkins wrote:
> > On 01/08/15 12:34, Robert Heller wrote:
> >
> >>
> >> This *strongly* suggests that there is a 'quoting hell' issue going on.
> >> Because of the way cron works, you might need to quote the spaces
> >> *twice*.
> >> (This is similar to what happens when you use spaces in file names and
> >> then
> >> use scp: you have to quote the spaces for the source shell and the remote
> >> shell.)
> >>
> >> The easy solution is to NOT USE SPACES IN FILE NAMES.  If that is not
> >> possible
> >> for some reason, you can create a script file (whose name does not
> >> contain
> >> spaces!) and put your command there (spaces, warts, quoting, etc.).
> >>
> >
> > I have taken your advice and renamed Expansion Drive to Expansion_Drive.
> > I've brought the time and date of the task forward (14 minutes and
> > counting down) and will see what happens.
> >
> > I will of course, let you all know what happens.
> >
> > Thanks for all the input.
> >
> > Cheers,
> >
> > Graham
> >
> >
> >
> >
> 
> RESULT!
> 
> The task ran according to it's new schedule and I was able to open the 
> archive using Engrampa.
> 
> I must admit it never occurred to me that spaces might be an issue. I'd 
> thought that the "\" in "Expansion\ Drive" would take care of that. 
> Evidently not.

I'm thinking that the command gets passed through one more than one parsing 
step (eg through more than one shell or something) and each parsing step 
strips off one 'laryer' of quoting.  Consider this command line:

localShell$: scp mail.deepsoft.com:'Mail/Attachments/Some\ Stuipd\ File\ Name.pdf' /tmp/

What is happening here is there is the present (local) shell strips off the
"'"'s. Then on the remote machine (mail.deepsoft.com) the backslashes
'protect' the spaces in the remote machine's shell. Leaving either the "'"s
off OR the backslashes off results in a syntax error, even though at first
glance, using both is logically wrong. *Both* sets of quoting is needed,
because there are two parsing steps (two shells).  I expect something like 
this is happening with your cron job.

"Friends don't let friends use spaces in file names." :-)


> 
> Thank you all.
> 
> Cheers,
> 
> Graham
> 
> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
            




More information about the ubuntu-users mailing list