Linux System Administration

0 of 85 lessons complete (0%)

System Backup & Recovery, Active Directory, LDAP

System Backup in Linux

You don’t have access to this lesson

Please register or sign in to access the course content.

System Backup in Linux

System backup refers to the process of copying and archiving important files, configurations, and sometimes the entire operating system to prevent data loss in the event of system failures, hardware issues, or accidental deletions. Regular backups ensure that you can restore the system or specific files if something goes wrong, thereby reducing downtime and data loss.

Types of Backups:

  1. Full Backup: Backs up everything, including the operating system, files, and configurations. This type is time-consuming but ensures a complete restore.
  2. Incremental Backup: Backs up only the data that has changed since the last backup. It is faster but requires multiple backups for full recovery.
  3. Differential Backup: Backs up all changes since the last full backup, combining speed and efficiency.
  4. Snapshot Backup: Captures the system’s state at a specific point in time, useful for quick recovery from minor issues.

Linux Backup Tools:

  1. rsync
    • A powerful file synchronization and backup tool that transfers only changed files.
    • Supports both local and remote backups.
    • Example: rsync -av /source/directory/ /backup/directory/
  2. tar
    • An archiving utility commonly used to bundle files into a single archive file, typically for full backups.
    • Example: tar -cvzf backup.tar.gz /path/to/directory
  3. dd
    • A low-level utility used for copying and cloning entire disks or partitions.
    • Example: dd if=/dev/sda of=/backup/sda.img bs=4M
  4. Timeshift
    • A popular tool for system snapshots, which focuses on restoring system files and configurations without affecting user data.
    • Ideal for quick recovery from system-level failures.
  5. rsnapshot
    • A filesystem snapshot utility based on rsync, it allows both local and remote backups with automated retention.
    • Example: rsnapshot daily
  6. Bacula
    • A feature-rich backup solution suitable for enterprise environments. It supports automated backups, tape drives, and more.
  7. Deja Dup
    • A user-friendly backup tool with a graphical interface, commonly used in GNOME desktops.
    • Allows scheduled backups and supports cloud storage services like Google Drive.
  8. Clonezilla
    • A disk imaging tool for cloning or creating disk images, perfect for disaster recovery scenarios.
    • Example:
      Create a disk image of the system: sudo clonezilla -sda
  9. Duplicity
    • Performs encrypted, bandwidth-efficient backups using GPG to encrypt and compress files.
  10. Amanda
    • Advanced backup software that supports tapes, disks, and cloud storage, primarily for larger infrastructures.

Each of these tools has specific strengths and can be chosen depending on the backup strategy, the size of data, or ease of recovery.