From 436b1361ffb813b4f9bbd3d49b8b07ecc6354599 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Tue, 28 Apr 2015 19:08:20 +0200 Subject: [PATCH] btrbk: bugfix: allow relative path for subvolume; adapted documentation --- btrbk | 4 ---- doc/btrbk.conf.5 | 12 +++++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/btrbk b/btrbk index 0399d72..9b127f6 100755 --- a/btrbk +++ b/btrbk @@ -424,10 +424,6 @@ sub parse_config(@) return undef unless(check_file($value, { relative => 1 }, $key, $file)); $value =~ s/\/+$//; # remove trailing slash $value =~ s/^\/+//; # remove leading slash - if($value =~ /\//) { - ERROR "Subvolume contains slashes: \"$value\" in \"$file\" line $."; - return undef; - } TRACE "config: adding subvolume \"$value\" to volume context: $cur->{url}"; my $subvolume = { CONTEXT => "subvolume", diff --git a/doc/btrbk.conf.5 b/doc/btrbk.conf.5 index 292c207..febcbf8 100644 --- a/doc/btrbk.conf.5 +++ b/doc/btrbk.conf.5 @@ -19,9 +19,10 @@ global options must be set before any sections are defined. The sections are: .TP \fBvolume\fR | -Directory of a btrfs volume (or subvolume) containing the source -subvolume(s) to be backuped (usually the mount-point of a btrfs -filesystem mounted with the \fIsubvolid=0\fR option). +Directory of a btrfs volume containing the source subvolume(s) to be +backuped. \fI\fR must be an absolute path and point +to a btrfs volume (or subvolume). Usually the mount point of a btrfs +filesystem mounted with the \fIsubvolid=0\fR option. .TP \fBsubvolume\fR Subvolume to be backuped, relative to the \fI\fR @@ -29,8 +30,9 @@ specified in the \fIvolume\fR section. .TP \fBtarget\fR | Target type and directory where the backup subvolumes are to be -created. In the current version of btrbk, the only valid \fI\fR -is \(lqsend\-receive\(rq. +created. \fI\fR must be an absolute path and point +to a btrfs volume (or subvolume). Currently the the only valid +\fI\fR is \(lqsend\-receive\(rq. .PP For the \fIvolume\fR and \fItarget\fR sections, you can also specify a ssh-url instead of a local directory. The syntax for \fI\fR is: