How To Install fssync on Debian 11

In this tutorial we learn how to install fssync on Debian 11. fssync is File system synchronization tool (1-way, over SSH)

Introduction

In this tutorial we learn how to install fssync on Debian 11.

What is fssync

fssync is:

fssync is a 1-way file-synchronization tool that tracks inodes and maintains a local database of files that are on the remote side, making it able to:

  • handle efficiently a huge number of dirs/files
  • detect renames/moves and hard-links

It aims at minimizing network traffic and synchronizing every detail of a file system:

  • all types of inode: file, dir, block/character/fifo, socket, symlink
  • preserve hard links
  • modification time, ownership/permission/ACL, extended attributes
  • sparse files

Other features:

  • it can be configured to exclude files from synchronization
  • fssync can be interrupted and resumed at any time, making it tolerant to random failures (e.g. network error)
  • algorithm to synchronize file content is designed to handle big files like VM images efficiently, by updating fixed-size modified blocks in-place

Main usage of fssync is to prevent data loss in case of hardware failure, where RAID1 is not possible (e.g. in laptops).

On Btrfs file systems, fssync is an useful alternative to btrfs send (and receive) commands, thanks to filtering capabilities. This can be combined with Btrfs snapshotting at destination side for a full backup solution.

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

Install fssync Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install fssync

Install fssync Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install fssync

Install fssync 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 fssync using aptitude by running the following command:

sudo aptitude -y install fssync

How To Uninstall fssync on Debian 11

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

sudo apt-get remove fssync

Uninstall fssync And Its Dependencies

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

sudo apt-get -y autoremove fssync

Remove fssync Configurations and Data

To remove fssync configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge fssync

Remove fssync configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge fssync

Dependencies

fssync have the following dependencies:

References

Summary

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