Backing up data on Dedicated Servers and VPS in Ruachost
Backups are critical for protecting your websites, applications, and databases from accidental deletion, corruption, or security incidents. On Ruachost Dedicated Servers and VPS, you have multiple options for creating and managing backups depending on whether your server is managed or unmanaged.
Backup Options Overview
Section titled “Backup Options Overview”| Hosting Type | Backup Options |
| Managed VPS | Manual backups, cPanel backups, optional Ruachost Cloud Backup (powered by JetBackup) |
| Managed Dedicated Server | Manual backups, cPanel/WHM backups, optional Ruachost Cloud Backup |
| Unmanaged VPS / Dedicated Server | Manual backups, Bash scripts with cron jobs, remote backups (Amazon S3, Google Drive, rsync) |
Backup Methods
Section titled “Backup Methods”1. Using WHM Backups (Managed Servers)
Section titled “1. Using WHM Backups (Managed Servers)”If your server includes WebHost Manager (WHM):
- You can configure full account backups for all cPanel accounts.
- Backups can be stored locally or sent to a remote destination (FTP, SFTP, Amazon S3).
- WHM also allows scheduling (daily, weekly, monthly).
2. Using cPanel Backups
Section titled “2. Using cPanel Backups”For individual accounts on VPS or Dedicated Servers with cPanel:
- Log in to cPanel.
- Go to Files → Backup.
- Choose Full Backup (entire account) or Partial Backup (home directory, databases, email).
- Download the backup to your computer or send it to a remote server.
3. Remote Cloud Backups
Section titled “3. Remote Cloud Backups”You can back up data to cloud storage providers:
- Amazon S3: Use s3cmd or AWS CLI to sync files.
- Google Drive: Use the gdrive utility to upload backups.
- Other remote servers: Use rsync or scp to transfer backups securely.
4. Bash Script + Cron Job (Unmanaged Servers)
Section titled “4. Bash Script + Cron Job (Unmanaged Servers)”For full control, you can create a custom backup script.
Example Script
Section titled “Example Script”#!/bin/bashdestination_folder="/home/username/backup/$(date +%F)"archive_file="backup-$(date +%H%M).tar.gz"
mkdir -p "$destination_folder"/bin/tar --exclude='/home/username/backup' -czvf "$destination_folder/$archive_file" /home/username/public_html-
Save this as backup-cron.sh
Section titled “Save this as backup-cron.sh” -
Make it executable
Section titled “Make it executable”
chmod +x /home/username/backup/backup-cron.shSchedule it with cron:
50 23 * * * /bin/sh /home/username/backup/backup-cron.sh(Runs daily at 11:50 PM).
5. MySQL Database Backups
Section titled “5. MySQL Database Backups”Use mysqldump to back up databases:
MySQL Database BackupsUse mysqldump to back up databases:6. Remote Backups with rsync
Section titled “6. Remote Backups with rsync”To copy backups to another server:
rsync -avz /home/username/backup/ user@remote-server:/backup/