DEV Community

Cover image for Performing Backups in Linux: Tools and the 3-2-1 Strategy
ispmanager.com for Ispmanager

Posted on

Performing Backups in Linux: Tools and the 3-2-1 Strategy

This article covers the tools and methods involved in performing a full Linux backup and a few of the tricks I use.

Here’s a backup checklist
Completeness. Backups should include all the critical components of your project: databases, site files, configuration files, and multimedia content.

Regularity is key to minimizing data loss. The frequency by which you back up depends on the pace of change on your site. As a rule, this ends up being daily to weekly.

Secure storage. Backups must not be stored on primary servers. It is better to use cloud storage or dedicated physical media.

Encryption. Data must be encrypted to protect sensitive data from unauthorized access. This is absolutely vital! Be sure to memorize your encryption password. Engrain it in your memory; it’s no good if you can’t remember it right away when you get a call in the middle of the night.

Automation. Automating processes reduces the risk of human error.

Recovery testing ensures that your backups work.

Versioning. Storing multiple versions of your backups can be useful if you need to restore data from a certain point in the past.

Before I dive into the details regarding backup tools and techniques, let’s talk about a simple but extremely effective strategy and the foundation of any data protection plan — the 3-2-1 concept.

The 3-2-1 concept

The gold standard in backup strategies is the 3-2-1 concept, which is named after its structure. If you follow the 3-2-1 concept, it is almost impossible for you to lose data.

Let's break it down step by step.

3 copies of the data →

The master copy is the working system that you use on a daily basis.

Keeping two additional backups means you can restore your system even if your primary backup gets corrupted or lost.

The benefits include:

✓ Resilience to failure and data loss.

✓ The ability to select an up-to-date copy when restoring.

✓ Protection against errors during the backup process if, for example, one of the copies gets corrupted.

2 different types of storage →

Using different types of storage media minimizes the risk that all your backups fail at the same time.

Your combination of storage types may include:

Local hard disks. Convenient thanks to quick access and data recovery.
Network Attached Storage (NAS). Convenient thanks to centralized management and its availability on the local network.
Removable media (external HDD/SSD, optical disks). Provide physical isolation and mobility.
Cloud storage. High availability, scalability, and protection against local disasters.

The benefits include:

✓ Reduced risk of data loss due to specific problems with a particular type of media.

✓ Increased flexibility and availability of your backups in various recovery scenarios.

1 off-site copy →

Storing a single backup in a remote location provides protection against local catastrophic events such as fires, floods, theft, or other incidents that could destroy all local copies of your data.

Off-site storage options include:

Cloud services, for example, Amazon S3, Google Cloud Storage, Backblaze B2, etc.
Remote physical locations like data centers, company branches, or bank vaults.
Off-site tape storage. Used by organizations with a stringent requirement for long-term archival data storage.

The benefits include:

✓ A high level of security and storage reliability.

✓ The data is available even in the event of the complete loss of your local infrastructure.

✓ The ability for global companies to distribute data geographically.

Tools for performing a complete backup of Linux systems

When it comes to tools for performing a full backup of a Linux system, I find the following to be important:

  • The ability to create complete system images including all files, settings, the boot sector, etc.
  • Reliability and proven track record.
  • Ease of use and documentation.
  • Support for a variety of storage media.
  • Backup automation and scheduling capabilities.
  • Encryption and data protection.
  • The time it takes a given tool to recover your system depends on several factors, including the network, storage speed, size of the data, and the recovery settings selected.

Here are the tools for performing a full Linux system backup that meet my requirements:

Bacula is a powerful open-source backup system that allows you to manage data backups, recovery, and validation in large networks. It is designed to perform complete data backups through a customized and closely managed process.

Recovery time: medium. Bacula is good for recovering individual files or parts of a system, but a full recovery may take longer. Bacula is geared towards enterprise use and is often used for complex infrastructures. The recovery process can take considerable time, especially if you need to recover data from distributed storage or tape.

*Amanda *(Advanced Maryland Automatic Network Disk Archiver) is another open-source solution focused on backing up and archiving data. Amanda allows you to centrally manage your network backup process, supports different types of data, and provides reliable recovery.

Recovery time: medium. Like Bacula, Amanda is designed for network backup and recovery. However, with Amanda, the recovery process can be more complex, especially in large network environments. The recovery time depends on the size of your data and network configuration.

Veeam Backup & Replication is a commercial solution that provides comprehensive data backup and replication, including for virtualized and physical environments. Veeam is widely used to protect corporate data, offering full backups of operating systems, virtual machines, and databases.

Recovery time. Fast. Veeam offers instant recovery, allowing you to start a recovered system almost instantly while reducing downtime. Veeam is known for its ability to recover virtual machines and physical systems quickly, especially in virtualized environments.

Acronis Cyber Protect is a commercial solution that combines backup functionality with antivirus and threat protection. A full system backup here involves creating an image of the entire system, including the operating system, programs, and settings.

Recovery time: fast. Acronis combines backups with cyber defense for fast recovery, even letting you instantly run a backup as a virtual machine. The recovery time depends on your system configuration and data volume, but Acronis usually provides fast recovery thanks to its optimized processes.

Clonezilla is a free program for creating and restoring disk and partition images. It allows you to clone entire hard disks or individual partitions, which is useful for backing up data, deploying operating systems, or migrating data to new devices. Clonezilla supports various file systems and can handle unstructured data by copying it sector by sector. It can also compress data to save space and lets you create and restore images over a network.

Recovery time: fast. Clonezilla is good for restoring a complete system image but not as effective for restoring individual files. It is fast for small amounts of data but can be slow for large systems. Clonezilla does direct cloning, so the recovery time depends on the data size and media speed.

For fast recovery in enterprise or virtualized environments, your best options are:

  • Veeam Backup & Replication
  • Cyber Backup
  • Acronis Cyber Protect

Clonezilla is great for fast recovery of individual systems or partitions, especially on small networks or personal computers. Bacula and Amanda may take longer to perform recovery, especially for large and complex infrastructures.

How to create backups in ispmanager

For more about backing up in ispmanager, see the documentation →

backups in ispmanager

More about backups in ispmanager

Our updated backup system

How to create a backup of one website

This article was originally published on the ispmanager blog

Top comments (0)