Backup is one of the most underestimated, yet critically important aspects of any infrastructure. Data loss caused by disk failure, human error, or an unsuccessful update can lead to downtime or financial losses.
In this article, we will explore how to organize backups on Unihost servers — from simple bash scripts to integration with control panels and container-based solutions.
1. Script-based approach: requires basic command-line knowledge
For those who prefer flexibility and full control over the process, it is possible to set up backups using a bash script.
This method does not require a control panel — you just need to create a script that will archive files, databases, and automatically remove old backups.
You can learn more about configuration and find a ready-to-use script example in a separate article:
This option is suitable for administrators who want a reliable and simple solution without third-party tools.
2. Portainer and container backups
For projects running in a Docker environment, there is a ready-to-use solution based on Portainer — it allows you to manage backups of containers and their data in just a few clicks.
You can learn more about the configuration in the following article:
Installing Duplicati with Portainer
The solution is based on integration with Duplicati, which provides the ability to:
-
perform automated backups of Docker volumes and configurations;
-
store backups in S3-compatible cloud storage or on a local server;
-
configure encryption and scheduling through a convenient web interface.
This approach is ideal for users whose infrastructure is based on containers and who require centralized and reliable backup management.
3. Control panels: a convenient interface for administration
If you use a server control panel, you can set up automated backups directly through its interface.
Plesk
Plesk provides a powerful built-in backup system:
-
supports incremental backups (only changes are saved);
-
allows storing backups in Amazon S3, Google Cloud, or an FTP storage;
-
offers automated restoration of individual websites, mailboxes, or databases.
cPanel
In cPanel, the backup system is available out of the box. You can configure:
-
daily or weekly backups;
-
selective restoration directly from the panel;
-
uploading copies to a remote server via SCP or Amazon S3.
Free alternative
For small projects or testing environments, HestiaCP is a great lightweight and free control panel with a basic backup system. It allows you to:
-
perform automatic backups of websites and databases;
-
configure a schedule and storage location;
-
restore required components in just a couple of clicks via the panel.
4. Backup best practices
To ensure that backups actually help you in a critical situation, follow these basic principles:
-
The 3-2-1 rule: keep 3 copies of your data, stored on 2 different media types, with 1 copy stored offsite.
-
Test restoration: a backup without recovery testing is just a copy of unknown state.
-
Encrypt and secure access: especially important when using cloud storage.
-
Automate: use cron, systemd timers, or built-in schedulers in control panels.
5. Conclusion
The choice of a backup approach depends on your tasks, scale, and the level of control you want to maintain.
- For standalone solutions, a classic bash script is a great option — it is simple, reliable, and does not require additional tools.
- For containerized environments, the combination of Portainer + Duplicati is the optimal choice, providing automation and centralized management of backup data.
- For servers with control panels, it’s more convenient to use built-in tools in Plesk, cPanel, or HestiaCP, where everything is handled through the interface without manual configuration.
The most important thing is not to postpone setting up backups “for later.” Even the simplest solution launched today may one day save your project from downtime and data loss.
Regular backups, recovery testing, and a properly organized backup strategy are not a luxury, but the foundation of a stable and secure infrastructure.