How To Copy File Form One Directory To Another Using SSH

Using SSH to copy a file from one directory to another is done simply with the following command:

cp file.name destination/directory/

How To Update To Latest Version of PHP

Many web applications, including Magento need PHP5.2 to function. If your server doesn’t have PHP 5.2, there’s a simple way to upgrade.

Using SSH, logon to your server.

Use these commands:

wget -q -O – http://www.atomicorp.com/installers/atomic.sh |sh

yum update php

/usr/local/psa/admin/sbin/websrvmng -a

/etc/init.d/httpd reload

That’s it!

How to Import Database Copy Into New Database Using SSH

Here’s the SSH command to import a database backup to a new database.

Navigate to the directory where your database copy resides using SSH.

mysql -uusername -p databasename < backupname.sql

You’ll be prompted for the password for the database. Enter that.

If this is a Magento database, it could take awhile to import. Ours is around 600M, so it took awhile.

That’s it.

How To Make Backup of MySQL Database Using SSH

Part of the transfer or migration of a website many times involves a database. If you are on an “ix” server, SSH is a great way to backup your MySQL database.

Here’s how you do it:

Using SSH, navigate to your httpdocs or public folder on your server where the website resides.

Use the following command.

mysqldump –opt -u theusername -p thedatabasename > /path/to/backupname.sql

This creates a copy of your database.

Now, you can transfer that database backup to your new server.