How To Install zsnapd on Debian 12

Learn how to install zsnapd on Debian 12 with this tutorial. zsnapd is ZFS Snapshot Daemon written in python

Introduction

In this tutorial we learn how to install zsnapd on Debian 12.

What is zsnapd

zsnapd is:

Python daemon that manages ZFS snapshots and send/receive backup. Based on zfs-snap-manager.

  • Remote ZFS snapshoting/aging wnd replication back to central ZFS backup server. Only need to install zfs-utils, zsnapd-rcmd (for secure) remote ssh key login and sshd on client, and use root ssh key based log in.
  • Has connectivity test to skip scheduled actions when the remote site cannot be contacted. Actually quite useful for ZFS backing up laptops. Reachability failures are logged of course!
  • Uses Python3
  • Native systemd support.
  • Configuration is stored in configuration files with the ini file format. Configuration .d parts directories also present
  • Triggers the configured actions based on time or a ‘.trigger’ file present in the dataset’s mountpoint.
  • Can take snapshots (with a yyyymmddhhmm timestamp format).
  • Can replicate snapshots to/from other nodes.
  • Push based when the replication source has access to the replication target.
  • Pull based when the replication source has no access to the replication target. Typically when you don’t want to give all nodes access to the backup/replication target.
  • Cleans all snapshots with the yyyymmddhh timestamp schmea format based on a GFS schema (Grandfather, Father, Son). Timestamp evaluation based on actual ZFS snapshot creation metadata.
  • Supports pre and post commands.

There are three methods to install zsnapd on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install zsnapd Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install zsnapd using apt-get by running the following command:

sudo apt-get -y install zsnapd

Install zsnapd Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install zsnapd using apt by running the following command:

sudo apt -y install zsnapd

Install zsnapd Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install zsnapd using aptitude by running the following command:

sudo aptitude -y install zsnapd

How To Uninstall zsnapd on Debian 12

To uninstall only the zsnapd package we can use the following command:

sudo apt-get remove zsnapd

Uninstall zsnapd And Its Dependencies

To uninstall zsnapd and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove zsnapd

Remove zsnapd Configurations and Data

To remove zsnapd configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge zsnapd

Remove zsnapd configuration, data, and all of its dependencies

We can use the following command to remove zsnapd configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge zsnapd

Dependencies

zsnapd have the following dependencies:

References

Summary

In this tutorial we learn how to install zsnapd package on Debian 12 using different package management tools: apt, apt-get and aptitude.