Author: Antonie Potgieter

MySQL : Transfer database from server to another server

In this article, I will show you how to dump a mysql database from one server to another remote server without having to export and import your SQL structure and data. We’ll dump a database directly to another empty database on another, remote server. In order to do this, you’ll need shell access to both servers and also create an empty database (with a valid login) on the remote server. Below is the command. mysqldump -v -uxxxxx -pxxxxx database_name | ssh root@remoteserver.com mysql -uxxxxx -pxxxxx database_name So in the command above, we first execute a mysqldump to create an SQL dump of the current database. You’ll need to replace “xxxxx” with the actual username and password of the current database. Lastly, we specify the name of the database to dump. Immediately, we connect to the remote server via SSH and execute a mysql command which will import the SQL dump which was just created, into the remote database. Same as with the current database, you’ll need to replace “xxxxx” with the username and password and of course the name of the remote database. You will be prompted for password once the current database has been dumped. The password is the ROOT password for connecting to the remote server via SSH. You’ll also notice that I used the “-v” option which executes the command in verbose mode. This prevents all...

Read More

Server to server file transfers

Server to server file transfers are relatively easy on a dedicated or virtual private server running Unix. I’ll quickly show you how to use the scp command which acts just about exactly the same as the cp command. It copies all files from a specified source path to a destination path on the remote server and uses via SSH. Lets say that I wanted to transfer all the files and folders of a single domain on Plesk, inside the httpdocs folder to another Plesk server into the public html directory of another domain, I would first change directory to where the source files lie. cd /var/www/vhosts/domain.com/httpdocs Quickly check the current path that you are in. pwd Now execute the scp command together with the username of a user whom has shell access on the remote server. After the username, we append the path to which the source files will be copied to the destination server. You’ll also notice that I used -r which is the recursive option. It will recursively copy all files folders, subfolders, etc… scp -r * root@domain.com:/var/www/vhosts/domain.com/httpdocs/ And that’s it! You’ll have all the specified source files copied from one server to another. I’m going to post another tutorial shortly on how to dump an entire MySQL database directly from one server into the database of another, remote server. Check the RSS feed if you are...

Read More

Mac OS .OGG to .MP3

There are probably other ways to convert OGG format to MP3, including some opensource/freeware command line scripts, but I managed to achieve this with an application called EasyWMA which is most definitely worth the $10 for a full license. Not only does it convert OGG to MP3, but it encodes/decodes many other formats as...

Read More

Crontab : Disable email notifications

By default, when you schedule a cronjob, the cron daemon will email the administrator with the results of the schedule. You can easily turn off email reporting by appending the string “>/dev/null 2>&1” (without quotes) to the end of the command. Like this : wget http://domain.com >/dev/null 2>&1 Hope this...

Read More

PHP: Random string with numbers and letters

I thought that some of you might find it useful to learn how to generate a random string or a random number with PHP. I wrote a quick function to use PHP to generate random. See it below: There is an easier way to do this with a single line of code but you won’t have as much control over the characters that you want to include/exclude from the random PHP string. Here it...

Read More

contridfx Live Stream

Watch me play live game streams!

Subscribe/like me on YouTube, Facebook, Mixer or Twitch to be notified when I go live! Thank you for your support!

Stay up to date

Get one email per month with latest news. You can unsubscribe at any time

Fill in a valid email

captcha

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Pin It on Pinterest