all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] Update LXC vzdump to support BTRFS
@ 2023-11-02 17:33 Thomas Freudenberg
  0 siblings, 0 replies; only message in thread
From: Thomas Freudenberg @ 2023-11-02 17:33 UTC (permalink / raw)
  To: pve-devel

Hi everyone,

in case that we need support for BTRFS SNAPSHOT Backups, I have patched the file:

/usr/share/perl5/PVE/LXC.pm

and added support to mount BTRFS SNAPSHOT SUBVOL.

If interested let me know if I should send in a patch.

Cheers
Tom


1795a1796,1813
>                   } elsif ($scfg->{type} eq 'btrfs') {
>                       # extract subvol path for snapshot from storage
>                       my $snap_subvol_path = $path =~s/$scfg->{path}\///r;
>
>                       # parse result from btrfs command for device uuid
>                       my $device_uuid;
>
>                       my $parser = sub {
>                           my $line = shift;
>                           if ($line =~ m/^.*\s+uuid:\s+([0-9a-f-]+)(\s+.*)?$/) {
>                               $device_uuid = $1;
>                           }
>                       };
>
>                       # get uuid for block device from btrfs volume
>                       PVE::Tools::run_command(['btrfs', 'filesystem', 'show', '-m', '/vol/pve'], outfunc => $parser, timeout => 10);
>
>                       PVE::Tools::run_command(['mount', '-o', 'ro', @extra_opts, '-t', 'btrfs', '-o', "subvol=$snap_subvol_path", "UUID=$device_uuid", $mount_path]);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-02 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-02 17:33 [pve-devel] Update LXC vzdump to support BTRFS Thomas Freudenberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal