Category: Command line

Some text from a computer terminal

Scheduling database backups with cron jobs

We're going to create a bash script which runs mysqldump (a MySQL backup program) to generate a database backup with a filename containing the date. We're then going to set up a cron jobĀ (a utility for running scheduled tasks) to run the script at regular intervals. We'll do all of this securely so that other users on the server can't access your MySQL username and password. This guide assumes that you're using a Unix based server (e.g. Ubuntu) with terminal access and a MySQL database. Step 1: Configure mysqldump with a user and password Before we can set up our… Continue reading »


Copying files from a server to your local machine with SCP

Having a local version of a website for development is a necessity. Chances are, you aren't saving all the uploaded content for your website in your repository and there are many reasons you may need to download the files to your local machine. Perhaps you're working on a new machine and you've checked out a copy of the project. You have a copy of the database with all the posts and pages but you're missing all the associated files and this can interfere with development in some cases. Or perhaps you haven't worked on the site in 6 months and… Continue reading »