btrfs: volume export: fix command for incremental stream
The subvolume itself cannot be included if there is a base snapshot or the command would fail with e.g. > ERROR: subvolume /mnt/btrfs/images/400/vm-400-disk-0 is not read-only Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
2ef1d256e7
commit
32f55f8c0d
@ -780,7 +780,8 @@ sub volume_export {
|
||||
}
|
||||
push @$cmd, '--';
|
||||
if (ref($with_snapshots) eq 'ARRAY') {
|
||||
push @$cmd, (map { "$path\@$_" } ($with_snapshots // [])->@*), $path;
|
||||
push @$cmd, (map { "$path\@$_" } ($with_snapshots // [])->@*);
|
||||
push @$cmd, $path if !defined($base_snapshot);
|
||||
} else {
|
||||
foreach_snapshot_of_subvol($path, sub {
|
||||
my ($snap_name) = @_;
|
||||
|
||||
Reference in New Issue
Block a user