Skip to content

Backing up data on shared hosting and reseller accounts in Ruachost

Regular backups are essential to protect your website files, databases, and emails. While Ruachost maintains server-level backups for disaster recovery, it is your responsibility to create and manage your own backups for maximum security and control.

This article explains how to back up your data manually and automatically on shared hosting and reseller accounts.

  1. Log in to your account using SSH or cPanel File Manager.

  2. To back up your public_html directory via SSH, run:

    Terminal window
    /bin/tar -czvf /home/username/public_html.tar.gz /home/username/public_html

    Replace username with your Ruachost account username.

  3. This creates a compressed file (public_html.tar.gz) containing all your website files.

  4. Download the file to your local computer for safekeeping.

You can schedule backups using cron jobs:

  1. Log in to cPanel.
  2. Go to Advanced → Cron Jobs.
  3. Set the backup interval (daily, weekly, monthly).
  4. Use the same tar command from above in the cron job.
  5. Optionally, configure the job to copy the backup to a remote location (e.g., Google Drive, Amazon S3, or another server via SCP/rsync).
  1. Log in to cPanel.
  2. Go to Databases → phpMyAdmin.
  3. Select the database you want to back up.
  4. Click Export and save the .sql file to your computer.
  1. Use the mysqldump command in a cron job:

    Terminal window
    mysqldump -u dbuser -p'dbpassword' dbname > /home/username/dbname.sql
  2. Replace dbuser, dbpassword, and dbname with your actual database credentials.

  3. Store the .sql file securely or transfer it offsite.

cPanel also provides built-in backup tools:

  1. Log in to cPanel.
  2. Go to Files → Backup.
  3. Choose Download a Home Directory Backup or Download a MySQL Database Backup.
  4. Save the files to your local computer.