in the past, I have had problems with restores failing due to the device
for differential volumes can't find the volumes stored by the
incremental.
I also have not been quite satisfied with having all the files in one
large directory without a structure, e.g., when I have different
retention policy for some volumes.
my fix is quite simple: add '/' to the list of acceptable characters in
a volume name. this allows me to specify the same Archive Device for
all the file media devices, and do the separation with Label Format like
"incr/Incr-". restore is unproblematic in this setup, since any Device
can be used to access all the volumes (even if they are actually in
different filesystems, due to the structure of my mounts).
I have not seen any bad effects from allowing this.
Bacula Systems has my contributor form, please consider applying this
patch. there is no patch to the documentation, since I couldn't find
the restrictions to the volume names specified explicitly anywhere.
diff --git a/bacula/src/dird/ua_label.c b/bacula/src/dird/ua_label.c
index aa008f0..8660ffd 100644
--- a/bacula/src/dird/ua_label.c
+++ b/bacula/src/dird/ua_label.c
@@ -642,7 +642,14 @@ bool is_volume_name_legal(UAContext *ua, const char *name)
{
int len;
const char *p;
- const char *accept = ":.-_";
+ const char *accept = ":.-_/";
+
+ if (name[0] == '/') {
+ if (ua) {
+ ua->error_msg(_("Volume name can not start with \"/\".\n"));
+ }
+ return 0;
+ }
/* Restrict the characters permitted in the Volume name */
for (p=name; *p; p++) {
diff --git a/bacula/src/stored/scan.c b/bacula/src/stored/scan.c
index 514331c..8129bac 100644
--- a/bacula/src/stored/scan.c
+++ b/bacula/src/stored/scan.c
@@ -148,8 +148,11 @@ static bool is_volume_name_legal(char *name)
{
int len;
const char *p;
- const char *accept = ":.-_";
+ const char *accept = ":.-_/";
+ if (name[0] == '/') {
+ return false;
+ }
/* Restrict the characters permitted in the Volume name */
for (p=name; *p; p++) {
if (B_ISALPHA(*p) || B_ISDIGIT(*p) || strchr(accept, (int)(*p))) {
--
Kjetil T. Homme
Redpill Linpro AS - Changing the game
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel