Backing up multiple hidden directories (zfs-auto-snapshot) in Proxmox

31 views
Skip to first unread message

Stefan Harbich

unread,
Sep 20, 2025, 2:29:52 PM (6 days ago) Sep 20
to bareos-users
Hello,
i would like to additionally back up my zfs-auto-snapshots on my Proxmox node. These are stored hidden in the following directories:
- /rpool/data/nfs-rpool/vm-100-disk-0/.zfs
- /rpool/data/nfs-rpool/vm-101-disk-0/.zfs
- /rpool/data/nfs-rpool/vm-101-disk-1/.zfs
- /rpool/data/nfs-rpool/vm-102-disk-0/.zfs
...
How can I ensure that if additional directories are created according to the above pattern, they are also backed up without having to add the directories to the fileset each time? This didn't work:
...
root@dsme01:~# cat /etc/bareos/bareos-dir.d/fileset/ProxmoxSnapshot.conf
FileSet {
Name = "ProxmoxSnapshot"
Description = "Backup all Proxmox Snapshots."
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
One FS = No # change into other files systems
xattrsupport = no
FS Type = btrfs
FS Type = ext2 # filesystems of given types will be backed up
FS Type = ext3 # others will be ignored
FS Type = ext4
FS Type = travel refs
FS Type = jfs
FS Type = xfs
FS Type = zfs
FS Type = fuse
}
File = /rpool/data/nfs-rpool/vm-*-disk-*/.*
}
# Things that usually have to be excluded
# You have to exclude /var/lib/bareos/storage
# on your bareos server
exclude {
}
}

...
Error message:
...
2025-09-20 20:17:47 psme02-fd JobId 1684: Could not stat "/rpool/data/nfs-rpool/vm-*-disk-*/.*": ERR=No such file or directory
...
Do you have a tip for me?
Regards, Stefan Harbich

Stefan Harbich

unread,
Sep 22, 2025, 12:10:02 PM (4 days ago) Sep 22
to bareos-users
Hello,
is there a way to use wildcards for directories? This way, different directories that are similar at the beginning are taken into account?
Regards, Stefan Harbich

Bruno Friedmann (bruno-at-bareos)

unread,
Sep 23, 2025, 10:51:35 AM (3 days ago) Sep 23
to bareos-users

Andreas Rogge

unread,
Sep 24, 2025, 4:53:34 AM (2 days ago) Sep 24
to bareos...@googlegroups.com
Hi Stefan,

I guess in this case I'd just go with a client-side script that
discovers the directories.
So in the FileSet you would have something like
File = "\\|/full/path/to/your/script"

The script is then supposed to discover the directories and print them
on stdout.

Hope that helps!

Best Regards,
Andreas

--
Andreas Rogge andrea...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221-630693-86
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

Oleg Volkov

unread,
Sep 25, 2025, 5:11:22 AM (22 hours ago) Sep 25
to bareos-users
".zfs" even does not exist. 
It is a pseudo directory supported by ZFS for its builtin automount. 
Every snapshot is a separate FS mounted in place. 

For example:
noname:/home/.zfs/snapshot/zfs-auto-snap_hourly-2025-09-03-0601 $ mount | grep home
noname/home on /home type zfs (rw,relatime,xattr,noacl,casesensitive)
noname/home@zfs-auto-snap_hourly-2025-09-03-0601 on /home/.zfs/snapshot/zfs-auto-snap_hourly-2025-09-03-0601 type zfs (ro,relatime,xattr,noacl,casesensitive)

To make this mount appear you have to "cd" there.
Reply all
Reply to author
Forward
0 new messages