0

TLDR: Can pgbarman be used with SSHFS?

In the barman configuration file I can change the directory where backups are stored to being a mounted directory, e.g. mounted with NFS:

barman_home = /mnt/barman-data/

In the documentation it (only) states the following about using mounted directories:

Like PostgreSQL, Barman does nothing special for NFS. The following points are required for safely using Barman with NFS: * The barman_lock_directory should be on a non-network filesystem. * Use version 4 of the NFS protocol. * The file system must be mounted using the hard and synchronous options (hard,sync).

Unfortunately the system that I would like to use only supports SSHFS and not NFS. I can create a mount point by adding the following to /etc/fstab:

user@server:/  /mnt/barman-data  fuse.sshfs  rw,idmap=user,reconnect,_netdev,allow_other  0 0

According to the documentation on sshfs, it doesn't support the hard and sync options, which are mentioned in the barman documentation. It does however have the following two settings:

-o sshfs_sync          synchronous writes
-o sync_readdir        synchronous readdir

Would a suitable combination of these settings make it possible to use SSHFS as reliable storage for PGBarman?

rasmush
  • 61
  • 1
  • 7

0 Answers0