| Web

Download Dreamhost Server Logs

This site is hosted on Dreamhost, and I could not be happier with them. But some time ago, the engineers there decided to disable FTP access to the server logs. No reason given.

If you have a Dreamhost shared account, try it. ftp into your server using your favorite FTP client, click the logs folder, then your site folder, then http and you’ll get an error. This is because the http folder is actually a symlink to a private, readonly folder on the server that is inaccessible to FTP. If you ssh in, you can cd to this folder and see the logs because the shell can traverse this symlink.

To download your logs, just use the scp command locally in your terminal as follows:

scp <user>@<domain>:/home/<user>/logs/<domain>/http/* <local-path>

Where

  • <user> is your Dreamhost shell user name
  • <domain> is your hosting domain name, and
  • <local-path> is where you want to dump the files

Note that I have no password in the command as I have set up ssh keys.

I use:

scp hiltmon@hiltmon.com:/home/hiltmon/logs/hiltmon.com/http/* ~/Projects/HiltmonDotCom/data/logs/

This command downloads all my logs into the correct place in my standard project folders. Note that Dreamhost only keeps about five (5) days of logs, so do this every few days to get it all.

Lovely!

Geek Aside: I rarely use this, I get all my stats from Google Analytics, but do occasionally check the errors.log file which is how I found that I was missing the web clip icons.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

Posted By Hilton Lipschitz · Feb 10, 2013 2:38 PM