keithpeter
July 9th, 2011, 08:12 PM
Hello All
Its summer so I can play for a bit as teaching has finished.
I've decided to explore using a Web hosting package with shell access to a linux server.
I want to syncronise the web docs directory on the server with a directory on this PC (actually in my dropbox folder so the site files are backed up and available on my laptop as well).
I tried mounting the remote server using ssfs, no deal. gvfs works under Gigolo, but then I don't get synch, in the sense that I have to remember which files I changed. I tried rsynch but had permission issues that meant I had to log into ssh and chmod the docs directory on the server.
Finally, I've hit on using lftp over sftp. The script I'm using is shown below...
#!/bin/sh
HOST=some.shell.account.server.co.uk
USER=myshelluser
PASS=myshellpassword
echo "Starting to sftp..."
lftp -u ${USER},${PASS} sftp://${HOST} <<EOF
cd /path/to/html/docs/directory
mirror -e -R /home/mylocaluser/mywebsitefiles
chmod -R 777 /path/to/html/docs/directory
bye
EOF
echo "done"
Is this sensible? Anyone got a better idea? I found it at http://www.unix.com/302110934-post24.html
Its summer so I can play for a bit as teaching has finished.
I've decided to explore using a Web hosting package with shell access to a linux server.
I want to syncronise the web docs directory on the server with a directory on this PC (actually in my dropbox folder so the site files are backed up and available on my laptop as well).
I tried mounting the remote server using ssfs, no deal. gvfs works under Gigolo, but then I don't get synch, in the sense that I have to remember which files I changed. I tried rsynch but had permission issues that meant I had to log into ssh and chmod the docs directory on the server.
Finally, I've hit on using lftp over sftp. The script I'm using is shown below...
#!/bin/sh
HOST=some.shell.account.server.co.uk
USER=myshelluser
PASS=myshellpassword
echo "Starting to sftp..."
lftp -u ${USER},${PASS} sftp://${HOST} <<EOF
cd /path/to/html/docs/directory
mirror -e -R /home/mylocaluser/mywebsitefiles
chmod -R 777 /path/to/html/docs/directory
bye
EOF
echo "done"
Is this sensible? Anyone got a better idea? I found it at http://www.unix.com/302110934-post24.html