Timer Backup Service
The Timer Backup Service is a systemd service designed to run a borg backup every 3 hours. This service is crucial for ensuring the data's safety and availability, as it automates the process of creating backups at regular intervals.
What is Borg Backup?
Borg Backup, also known as borg, is a deduplicating backup program that also supports compression and encryption. It is designed to efficiently store backups of large amounts of data, while ensuring data integrity and security.
Service Description
The Timer Backup Service is defined by the following systemd unit file:
[Unit]
Description=runs borg every 3 hours
[Timer]
OnUnitActiveSec=3h
[Install]
WantedBy=multi-user.target
The [Unit] section provides a brief description of the service. The [Timer] section specifies that the timer should be activated every 3 hours. Finally, the [Install] section specifies that the service should be started when the system enters multi-user mode.
How it Works
When the timer is activated, the Timer Backup Service runs the borg backup command, which performs the following tasks:
- Creates a new backup archive
- Compresses the data using the lz4 algorithm
- Encrypts the data using a 256-bit AES key
- Stores the backup archive on a remote server
This process ensures that the backup is secure, efficient, and easily recoverable in the event of a data loss.
References
This article is intended to provide a detailed overview of the Timer Backup Service, including its purpose, design, and operation. By understanding how this service works, users can ensure that their data is being backed up regularly and securely, while also gaining insight into the use of systemd timers for automating system tasks.