Support / KnowledgeBase

 
Search the KnowledgeBase Search

(gs) Backing Up Site Content

  • Applies to: (gs)

  • Difficulty: Medium

  • Time needed: 20 minutes

  • Tools needed: FTP, SSH

 
  • Applies to: (gs)
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: FTP, SSH

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

  1. Cobian Backup at http://www.educ.umu.se/~cobian/cobianbackup.htm:
    A backup utility with some very advanced functionality.
  2. SmartFTP at http://www.smartftp.com/:
    A stable FTP client with plenty of advanced features.
  3. WinSCP at http://winscp.net/eng/index.php:
    A robust GUI frontend for the SFTP/SCP protocol for secure file transfers.

Macintosh OS X

  1. Transmit at http://panic.com:
    An FTP client that is very POPular with OS X users.
  2. 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:

  1. Select the database you'd like to back up from the column on the left.
  2. Click on Export from the top set of tabs.
  3. Select the tables from the list that you would like to backup. If you want to backup the entire database hit "Select All."
  4. Select Structure and data from the bullet list.
  5. Selection boxes:
    1. 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.
    2. Click the Save as file box.
    3. Use the Save as file zipped if you want to compress the backup before downloading it from the server.
  6. 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.

  1. Log into your server via SSH and cd into a directory where you have write access such as:
    /home/00000/domains/example.com/html/
  2. 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.

  3. 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.

  4. 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.

See also


User Comments

No visitor comments posted. Post a comment
Fields marked with an asterisk(*) are required. Comment on this article
Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue