(gs) Backing Up Site Content
Overview
This list is not meant to be comprehensive, but rather more of an introduction. There are other tools available for your operating system that would work equally well. These can range from both manual to fully automated solutions.
Files
Windows
-
Cobian Backup at http://www.educ.umu.se/~cobian/cobianbackup.htm:
A backup utility with some very advanced functionality. -
SmartFTP at http://www.smartftp.com/:
A stable FTP client with plenty of advanced features. -
WinSCP at http://winscp.net/eng/index.php:
A robust GUI frontend for the SFTP/SCP protocol for secure file transfers.
Macintosh OS X
-
Transmit at http://panic.com:
An FTP client that is very POPular with OS X users. -
Cyberduck at http://cyberduck.ch:
A Popular freeware FTP client.
UNIX/OS X
Although there are very different ways you could accomplish backups in a *NIX environment, the overwhelming choice used for backups are usually based on rsync. rsync is a very powerful command line tool that can be coupled with ssh and cron to provide a very automated solution for your backup needs. We would suggest looking at the wealth of online resources available for using rsync.
Databases
Backing up content on your (gs) service may involve more than just your html files. Increasingly more and more sites are database-driven. There are different ways you can backup your content but the most common ways are via a shell using the command-line tool MySQLdump or through the AccountCenter.
For backing up your MySQL databases, we can offer two methods:
METHOD 1 - "Manage Databases" Admin tool
You can use PHPMyAdmin to backup/restore your database if it is relatively small (~10MBs).
If your database is larger than 10MBs, please skip to METHOD 2 below.
Once logged into the Admin tool of the "Manage Databases" section of the AccountCenter, perform the following steps:
- Select the database you'd like to back up from the column on the left.
- Click on Export from the top set of tabs.
- Select the tables from the list that you would like to backup. If you want to backup the entire database hit "Select All."
- Select Structure and data from the bullet list.
-
Selection boxes:
- Check the Add drop table box if you are moving the database to a new location and don't want to merge the old table with an existing one.
- Click the Save as file box.
- Use the Save as file zipped if you want to compress the backup before downloading it from the server.
- Click the "Go" button. When prompted, save the file to your local computer.
METHOD 2 - Shell Access
This method works regardless of the size of your database. You must have SSH enabled for the serveradmin user.
-
Log into your server via SSH and cd into a directory where you have write access such as:
/home/00000/domains/example.com/html/ -
Enter the following command:
mysqldump --add-drop-table -h internal-db.s00000.gridserver.com -u username -p dbname > dbname.sql* omit the '--add-drop-table' argument if you'll want to merge this backup with an existing database upon restore.
* Where 'username' is replaced by the MySQL username.
* Replace 'db00000' with the name of the database to be backed up.
* Replace dbname.sql with what you'd like to name the backup file. -
Enter your MySQL password at the prompt. If you do not know your password, you can reset it in your AccountCenter.
* If you get an error that looks like this:
ERROR 1045: Access denied for user: 'username@localhost' (Using password: YES)You have entered an incorrect password. Please retype it carefully or change it in the AccountCenter.
- Use your FTP client or other means to download the file to your local computer.
NOTE:
Please do not keep copies of your database in any of your Domains/html directories as that content is accessible to your site visitors.