Archive

Posts Tagged ‘bash’

Restore / uncompress a plesk backup file using terminal

November 2nd, 2009 No comments

Today I was had to move a few web sites from one server to another. As I did not have ssh or ftp access to it, the only way to do it was through Plesk. As I don’t have experience using Plesk, I did not know that Plesk’s built in File Explorer can only be used to manage your web site’s files within the server, but it does not let you download those files. So, looking around Plesk’s admin interface I found the backup feature. That looked promissing, so I clicked on it and it brought me to another page called “Backup Manager”. This page allows you to set up periodic or one time backups. Backups can be saved in Plesk’s local repository or in an external FTP server. So I set up all the FTP details and start the backup. Once the backup finished I tried to open it on a linux box and file-roller gave an error when it tried to extract it. A `file` showed that the file was indeed in gzip format.

Read more…

Categories: Plesk Tags: , , , , , ,

Bash Script to create a new symfony project and install optional plugins

October 29th, 2009 3 comments

As we already mentioned in my last post, I have been playing a lot with Symfony these last few months. While I really enjoy working with symfony, it is always a pain to remember how to start a new project, install all the plugins and read the plugin’s documentation. After googling around I found that Gordon Franke published this post. It had a basic script to install symfony and have it working out of the box with very little effort. Me, being a huge fan of little effort, decided to change this script so that it’s even more useful and more powerful, so I don’t loose time installing all those boring and needed plugins I like. The result can be found on GitHub. The script works pretty well, but it does have bugs, so don’t be shy and report them, or fix them when you find one!

Categories: bash, symfony Tags: ,

Get unix timestamp in bash

May 9th, 2009 6 comments

I’m posting this since I always forget it…

date +%s

More info: http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/

Categories: date/time Tags: , ,

Keeping directories in sync with unison

May 9th, 2009 3 comments

As opposed to rsync, unison is a two way file synchronizer. Similar to MySQL’s master to master replication. To set it up in Ubuntu (Intrepid) keep on reading…

Read more…

Categories: mysql, php, server, sync, Uncategorized Tags: , , ,

Make svnserve load on startup (Ubuntu)

April 25th, 2009 2 comments

Make svnserve load on startup:

First create a new script on init.d

vi /etc/init.d/svnserve

Read more…

Categories: svn Tags: , ,

Set new logrotate tasks to rotate apache logs in non-standard directories

April 23rd, 2009 6 comments

I prefer compressing old logs to save space. Edit logrotate.conf

vi /etc/logrotate.conf

Read more…

Categories: logrotate Tags: , , , ,

How to exchange ssh keys for passwordless login

April 23rd, 2009 1 comment

As I’m always using ssh, copying or rsyncing files between all my servers I find it very annoying to always have to type in my login password. To avoid that, I exchanged my ssh keys so that all the authentication is done through those keys. To achieve that simply:

Read more…

How to sync date/time in Ubuntu Intrepid

April 23rd, 2009 4 comments

In order to keep my servers always showing the correct date/time I use a little software called chrony and make sure I’m using the correct time zone.

Read more…

Categories: Uncategorized Tags: , , , , , ,