Hi there,
I'm running Ubuntu 10.04 LTS, fresh install, and have been searching far and wide for the answer to this. I think it is probably either something simple, or i'm doing something fundamentally wrong...
1) I have a script which puts all my files into a tar.gz file in a local directory.
2) I have a 'Windows share' mounted using a tool found in 'Places>Connect to server'
This mounts the server to:
Quote:
/home/dan/.gvfs/dan\ on\ servername.ac.uk
|
3) I wish to copy my backup to the mounted Windows server. So i use the command:
Quote:
scp backup_26-01-2011.tar.gz /home/dan/.gvfs/dan\ on\ servername.domain.ac.uk/backup/
|
And this completes nicely.
....Start of problem:
4)I wrote a bash script to allow this to run as a cron job:
Quote:
#!/bin/bash
zipname='dan_'`date +%d-%m-%Y`'.tar.gz'
source='/home/dan/temp_backups'
target='/home/dan/.gvfs/dan\ on\ servername.domain.ac.uk/backup/'
scp $source/$zipname $target
|
The target is correct (browsed there via terminal, and used 'pwd'), but the error i get back is:
Quote:
servername.domain.ac.uk/backup/: No such file or directory
|
Is there anything particularly wrong with what i'm attempting? My best guess is that the spaces in the mount name are causing a problem, but i've tried using quotation marks in the form of:
Quote:
target='/home/dan/.gvfs/dan\ on\ servername.domain.ac.uk/backup/'
|
and
Quote:
target='"/home/dan/.gvfs/dan\ on\ servername.domain.ac.uk/backup/"'
|
Without any change in error message, both when i do and do not include backslashes.
Any help would be much appreciated!