Backups and Restore#
Regular backups are the most critical part of any hosting setup. No matter how secure your server is, hardware failures, software bugs, or human errors can lead to data loss. HostsNix provides a comprehensive backup system that supports both on-demand and scheduled automatic backups for your website files and databases.
Backup Types#
HostsNix supports two types of backups, accessible from the Backups page in the sidebar:
Project Backup (Files)
Creates a compressed archive (.tar.gz) of an entire website’s directory, including all files, images, themes, plugins, and configurations. This is a complete snapshot of your website’s files as they exist on disk.
Database Backup
Creates a compressed SQL dump (.sql.gz) of a MySQL database. This includes all tables, data, stored procedures, and triggers. The dump can be imported into any MySQL server to recreate the database.
???? Tip: For a complete website backup, create both a project backup (for files) and a database backup (for data). Together, they contain everything needed to fully restore your website.
Creating an On-Demand Backup#
- Navigate to Backups from the sidebar
- You’ll see the backup list showing all existing backups with their type, target, date, and size
- Click “Backup Now”
- Select the backup type:
- Project Backup — Then select which website to back up from the dropdown
- Database Backup — Then select which database to back up
- Click “Create Backup”
- The backup starts immediately. A progress indicator shows the status. Depending on the size, it may take from a few seconds to several minutes
Setting Up Scheduled Backups#
Automated backups ensure you always have recent restore points. Switch to the Schedules tab on the Backups page to set up recurring backups:
- Click “Add Schedule”
- Configure the schedule:
- Backup Type — Project or Database
- Target — Select the website or database
- Frequency — Daily, Weekly, or Monthly
- Time — When to run the backup (choose off-peak hours to minimize impact on website performance)
- Retention — How many backups to keep. Older backups are automatically deleted when the limit is reached. We recommend keeping at least 7 daily backups or 4 weekly backups
- Click “Save Schedule”
???? Recommended backup strategy: Set up daily database backups (databases change frequently) and weekly project backups (files change less often). Keep 7 days of database backups and 4 weeks of file backups.
Restoring from a Backup#
To restore from any backup:
- Find the backup in the backup list
- Click the “Restore” button next to it
- Read the confirmation dialog carefully — restoring will overwrite current data
- Click “Confirm Restore”
- The panel extracts the backup archive and restores all files or imports the SQL dump
⚠️ Important: Restoring a backup overwrites current files or database contents. Always create a fresh backup of the current state before restoring an older one, so you can roll back if needed.
Download and Delete Backups#
- Download — Download any backup file to your local computer for offsite storage. We recommend keeping copies of important backups on a separate device or cloud storage service
- Delete — Remove old backups to free up server disk space. Scheduled backup retention handles this automatically, but you can manually delete unneeded backups
Backup Storage#
Backups are stored on your server’s local disk at /rknix/backups/. Keep an eye on disk usage — large websites can produce large backup files. If you’re running low on disk space, consider downloading and deleting older backups, or reducing the retention count.