Re: [Bacula-users] bacula-dir can't open database

2012-02-26 Thread Stuart McGraw
On 02/26/2012 01:44 PM, Lucas B. Cohen wrote:
> On 2012.02.26 21:01, Stuart McGraw wrote:
>> I just updated to bacula-5.2.6 (from 5.2.5) using the Fedora-15 
>> rpms at repos.fedorapeople.org/repos/slaanesh/bacula/.
>> 
>> However, when I try to start the bacula-dir, it appears it 
>> is trying to open a sqlite database catalog, rather than the 
>> postgresql one I have been using.   
> 
>> The database, db user, etc all exist and worked fine before the
>> update.  Why is it now trying to open a sqlite database (if that 
>> is the problem, and now that I think about it, what was telling 
>> it before that I am using a postgresql database)?
> 
> I believe that's defined at configure time (the step before
> compilation). Hence, you're going to want to install a package that has
> been built to be used with PostgreSQL.

Ah, OK.  I just occurred to me to read the README.txt 
file at
  http://repos.fedorapeople.org/repos/slaanesh/bacula/
and that explains how to use the 'alternatives' command
to select the postgresql libs.
Thanks jogging me in the right direction.
Everything working fine now.

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bacula-dir can't open database

2012-02-26 Thread Stuart McGraw
I just updated to bacula-5.2.6 (from 5.2.5) using the Fedora-15 
rpms at repos.fedorapeople.org/repos/slaanesh/bacula/.

However, when I try to start the bacula-dir, it appears it 
is trying to open a sqlite database catalog, rather than the 
postgresql one I have been using.   

  # cd /etc/bacula/
  # bacula-dir -c ./bacula-dir.conf -t
  bacula-dir: dird.c:954 Could not open Catalog "MyCatalog", database "bacula".
  bacula-dir: dird.c:959 sqlite.c:182 Database /var/spool/bacula/bacula.db does 
not exist, please create it.
  26-Feb 11:59 bacula-dir ERROR TERMINATION
  Please correct configuration file: ./bacula-dir.conf

My bacula.conf files are unchanged from before the update and 
in particular, bacula-dir.conf has,

  Catalog {
Name = MyCatalog
dbname = "bacula"; dbuser = "bacula"; dbpassword = "***"
}

The database, db user, etc all exist and worked fine before the
update.  Why is it now trying to open a sqlite database (if that 
is the problem, and now that I think about it, what was telling 
it before that I am using a postgresql database)?
 
I am sure I am being really stupid but I'd appreciate a hint.

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] query for file sizes in a job

2011-10-07 Thread Stuart McGraw
On 10/06/2011 12:36 PM, Jeff Shanholtz wrote:
> I’m currently tuning my exclude rules and one of the things I 
> want to do is make sure I’m not backing up any massive files
> that don’t need to be backed up. Is there any way to get bacula
> to list file sizes along with the file names since llist doesn’t
> do this?

The filesize and other file attributes are stored in 
(psuedo?-)base-64 encoded form in the lstat field of the 
'file' table of the catalog database.

I ran into the same problem and, since I'm using Postgresql
for my catalogs, wrote a little pg extension function in C 
that is called with an lstat value and the index number of 
the stat field wanted.  This is used as a base to define 
some one-line convenience functions like lstat_size(text), 
lstat_mtime(text), etc, which then allows one to define 
views like:

   CREATE VIEW v_files AS (
SELECT f.fileid,
   f.jobid,
   CASE fileindex WHEN 0 THEN 'X' ELSE ' ' END AS del,
   lstat_size (lstat) AS size,
   TIMESTAMP WITH TIME ZONE 'epoch' + lstat_mtime (lstat) * 
INTERVAL '1 second' AS mtime,
   p.path||n.name AS filename
FROM file f
JOIN path p ON p.pathid=f.pathid
JOIN filename n ON n.filenameid=f.filenameid);

which generates results like:

SELECT * FROM v_files WHERE ...whatever...;

 fileid  | jobid | del |   size   | mtime  | filename   

-+---+-+--++
 2155605 |  1750 | |39656 | 2011-10-06 21:18:17-06 | 
/srv/backup/files-sdb1.txt
 2155606 |  1750 | | 4096 | 2011-10-06 21:18:35-06 | /srv/backup/
 2155607 |  1750 | X   |0 | 2011-10-05 19:59:34-06 | 
/home/stuart/Maildir/new/1317866374.V803I580003M622752.soga.home
 2155571 |  1749 | | 39553788 | 2011-10-05 21:24:16-06 | 
/var/spool/bacula/bacula.dmp
 2155565 |  1748 | |39424 | 2011-10-05 20:24:49-06 | c:/stuart/pmt.xls
 2155566 |  1748 | | 1365 | 2011-10-05 21:22:42-06 | 
c:/Local/bacula/data/pg_global.sql
 2155567 |  1748 | | 45197314 | 2011-10-05 21:23:07-06 | 
c:/Local/bacula/data/pg_jmdict.dmp

I've found it very convenient and will be happy to
pass it on to anyone interested but have to add a 
disclaimer is that this was the first time I've used
C in 20 years, first time I ever wrote a PG extension
function and first time I ever looked at the Bacula 
source code, so be warned. :-)

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Still not getting wildcard matching

2011-06-24 Thread Stuart McGraw
On 06/23/2011 04:26 AM, Martin Simmons wrote:
>>>>>> On Wed, 22 Jun 2011 21:25:24 -0600, Stuart McGraw said:
[...]
>> I have not been seen in the Bacula manual a description of exactly 
>> how filenames match wildcard specs (e.g. does "a*b" match "a/b"?).  
> 
> Yes, that is the problem.  "/home/*/.*" matches "/home/smcg4191/Maildir/.foo"
> :-(  You'll probably have to use regex for that one.
> 
>> Is one available somewhere?
> 
> Look at man fnmatch.  Bacula can pass the FNM_CASEFOLD flag if IgnoreCase=yes
> is specified, but that is the only documented option.

Thanks.

Sadly, the linux man pages I looked at didn't give any
description of matching semantics but they do say it is
POSIX.2 conformant so it is possible to track down its
behavior that way.

It looks like Bacula contains its own implementation of
fnmatch so it should be possible for the Bacula documentation 
to describe its behavior directly without passing the buck 
to the OS docs.

fnmatch has a FNM_PATHNAME option that will cause "*" et.al.
not to match slashes.  Has there ever been consideration given
to allowing some form of Wild* directive that would use that
option?  It seems like that would have solved my problem and
make many FileSet rules more intuitive.  The current matching
rules make it pretty easy to exclude more than one intended.

--
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Still not getting wildcard matching

2011-06-22 Thread Stuart McGraw
I am converting FileSets that used mostly used regexes
to use wild matches where possible.  But I am still not
getting how wildcard matching is working.

Options {
Wilddir = "/home/*/.backup"
Wild= "/home/*/.backup/*"
}
Options {
Exclude = yes
Wild= "/home/*/.*"
Wilddir = "/home/*/tmp"
Wilddir = "/home/*/Maildir/.*/tmp"
}
File = /home

The above FileSet is excluding all /home/*/Maildir/.* files, not
just the .../tmp subset I intended.  Why?  And how do I fix it?

I have not been seen in the Bacula manual a description of exactly 
how filenames match wildcard specs (e.g. does "a*b" match "a/b"?).  
Is one available somewhere?

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Nuke and Start Over

2011-06-22 Thread Stuart McGraw
On 06/22/2011 04:29 AM, Jan Behrend wrote:
> On 06/22/2011 12:16 PM, Michael Anderson wrote:
>> Hello,
>> 
>> I've been experimenting a bit and would like to nuke everything and 
>> start over. I've dropped my database, created a new one, and run the 
>> make_postgres_tables script. Additionally, I've deleted all the files 
>> under /var/lib/bacula, but when I start bconsole, I still have all the 
>> old jobs there.
>> 
> 
> Hi,
> 
> Clean the bacula working directory:  /var/lib/bacula 

Specifically, /*.state.
The working directory of my Fedora system is 
/var/spool/bacula/ but the location varies with
compile options.


--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Migrating form mysql to postgresql: Loading the database takes very long

2011-06-21 Thread Stuart McGraw
On 06/21/2011 08:06 PM, Dan Langille wrote:
> 
> On Jun 21, 2011, at 3:59 AM, Marcus Mülbüsch wrote:
> 
>> I want to migrate my bacula installation from mysql to postgresql, 
>> following the guide in 
>> http://www.bacula.org/5.0.x-manuals/en/main/main/Installing_Configuring_Post.html#SECTION00445
>> 
>> After dumping and converting the database the sql-file now has 9GiB.
>> 
>> I began loading the db into postgres about 18 hours before, but the 
>> process is not yet finished. Is this normal? Or did I miss an important 
>> step?
>> 
>> And the command to load the database is indeed:
>> 
>> "psql -Ubacula bacula < bacula-backup.sql"
>> 
>> and not the mangled version given on the linked page?
> 
> 

> My guess: the output is a series of insert statements, each of which is run 
> in its own transaction.
> 
> Someone else might be able to help more.

The other thing that can be problematic when loading large
amounts of data are indexes on the tables.  Common practice
is to drop indexes (and foreign key constraints but I don't
think Bacula uses any) before loading, and recreating them 
after.  

You can identify the indexes from the CREATE INDEX commands
in /usr/libexec/bacula/make_postgresql_tables.  Drop them 
prior to loading, and then rerun the CREATE INDEX commands
after loading -- it can make a big difference in loading 
time.

HTH



--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Bacula's python interface

2011-06-21 Thread Stuart McGraw
Hello All,

I am trying to use the Python scripting facility in Bacula.

An initial test (in the JobEvents class per the DirStartup.py
example file distributed with Bacula)...

  def NewVolume(self, job):
 job.JobReport = "Python: in NewLabel method (1)"
 job.JobReport = "Python: in NewLabel method (2)"
 print "Python: in NewLabel method (3)"
 job.VolumeName = str(job.JobId) + ".bac"
 return 1

produces the log output:

  21-Jun 14:53 soga-dir JobId 1397: Start Backup JobId 1397, 
Job=SogaBkup.2011-06-21_14.53.12_03
  21-Jun 14:53 soga-dir JobId 1397: Python: in NewLabel method (1)
  21-Jun 14:53 soga-dir JobId 1397: Using Device "FileStorage"
  21-Jun 14:53 soga-sd JobId 1397: Labeled new Volume "1397.bac" on device 
"FileStorage" (/d2/bacula/new).
  ...

1. What happened to the "Python: in NewLabel method (2)" message?!

The examples file clearly shows multiple uses of job.JobReport.
(And secondarily, I presume .JobReport is a Python property, yes?
Otherwise, were it an ordinary Python attribute, multiple assignments
would not only be ineffective, but the last assignment, not the 
first, would win.) 

What is wrong with either: a) my code, or b) my understanding,
or c) Bacula?

2. What happened to the "Python: in NewLabel method (3)" message?

Again, the examples show print statements being used but the
documentation is silent on what effect they have.  One could
guess looking at the 
  sys.stdout = events  # send stdout to Bacula
line in the example BaculaEvents.JobStart method that they also 
go to the log, but then what is the difference between "print"
and JobReport?

If anyone has used the Python interface and can shine some
enlightenment on me, I will be very grateful.


Using Bacula 5.0.3, Python 2.7.1, both as packaged by Fedora-15.
Here is my entire DirStartup.py file for reference:

import sys, bacula

class BaculaEvents(object):
  def __init__(self): pass
  def JobEnd(self, job): pass
  def Exit(self, job): pass
  def JobStart(self, job):
 events = JobEvents() # create instance of Job class
 events.job = job # save Bacula's job pointer
 job.set_events(events)   # register events desired
 sys.stderr = events  # send error output to Bacula
 sys.stdout = events  # send stdout to Bacula
 
bacula.set_events(BaculaEvents()) # register daemon events desired

class JobEvents(object):
  def __init__(self): pass
  def JobInit(self, job): pass
  def JobRun(self, job): pass
  def VolumePurged(self, job): pass
  def write(self, text): pass  [*]
  def open(self, file): pass
  def read(self, mem): pass
  def close(self): pass
  def NewVolume(self, job):
 job.JobReport = "Python: in NewLabel method (1)"
 job.JobReport = "Python: in NewLabel method (2)"
 print "Python: in NewLabel method (3)"
 job.VolumeName = str(job.JobId) + ".bac"
 return 1

[*] I tried this as "pass" as shown and also as defined in
the examples file, "self.job.write(text)", but it made no
difference in the results above.

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Fileset: How exclude all except...

2011-06-21 Thread Stuart McGraw
On 06/20/2011 12:39 PM, Martin Simmons wrote:
>>>>>> On Mon, 20 Jun 2011 11:13:39 -0600, Stuart McGraw said:
>> 
>> > If you also wish to exclude other dot-directories, I would try something
>> > like:
>> > 
>> > FileSet
>> > {
>> >Include
>> >{
>> >   Options
>> >   {
>> >  wilddir = "/home/*/.backup"
>> >   }
>> >   Options
>> >   {
>> >  exclude = yes
>> >  wild = "/home/*/.*"
>> >   }
>> >   File = /home
>> >}
>> > }
>> 
>> That's what I tried before (along with some 
>> permutations -- I admit to still not understanding
>> well how Bacula interprets Filesets.)  The .backup 
>> directory is included in the backed up files but its 
>> contents are not.
> 
> Adding 
> 
> wild = "/home/*/.backup/*"
> 
> to the first options clause should fix that.

Indeed it did, thanks!  (I thought I tried that 
before posting, and definitely tried again it after 
reading your response but seems I screwed something 
up.  This morning after a good night's sleep it does 
work as advertised :-)

> BTW, excluding all dot files will lose potentially
> important ones such as
> .bashrc and .gnupg.

My plan is to move such files into the .backup 
directory and replace the originals with symlinks.

Thanks for your help.

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] How do counters work?

2011-06-20 Thread Stuart McGraw
On 06/20/2011 04:51 PM, Dan Langille wrote:
> I;m posting this because nobody has answered you yet. 
> Perhaps my prompts will get you to supply additional information.  :)

Thanks, much appreciated.
 
> On Jun 20, 2011, at 1:41 PM, Stuart McGraw wrote:
> 
>> So I am generating backup volumes limited in size 
>> to fit on a DVD.  Since I use automatic volume labeling
>> and some backups result in multiple volumes, I include
>> a counter in the label name.  I want its value to be
>> 1 for the first volume of the job, 2 for the second, 
>> etc.
> 
> Well, that's not the purpose of counters.  Volume names
> are really for Bacula, not for humans.   Counters are
> there just to help with automated labeling of Volumes.
> 
> I suggest that discussion on whether or not we like this
> behavior that is outside the scope of this discussion.  :)

That's fine.  But I don't understand your statement 
that volume names (the things set by the LabelFormat
directive, yes?) are solely for Bacula.  Why then does 
the LabelFormat directive exist rather than Bacula
simply using an incrementing serial number?  It seems
to me self-evident that both humans and Bacula need
to use them and they should, to the extent possible, 
be constructed to meet both needs.  

>> First problem: counter does not get reset per job
>> but only when director is restarted.  (This strikes 
>> me as particularly useless behavior... is not the 
>> most frequent (only?) use of counters in a label?
> 
> Just because a feature does not do what you want, does
> not make it useless. 

Of course.  I was trying to convey that *I* could
not see a use for it.

> Clearly it was designed with a use
> case in mind.  :)

That may well be but often, especially early
in development, things that seemed like a good
ideas turn out to be not as useful as envisioned.

I asked if I was missing something as a way of
soliciting an explanation of its use.  However
that was just an aside and not directly relevant
to my problem.

>> Why would one want a value in a long-lived label
>> dependent on an arbitrary event like a service 
>> restart?  Maybe I am missing something). 
> 
> We have not seen your counter usage, so we cannot comment upon it. 

Sorry, I though my explanation was sufficient.  I 
create a (db persistent) counter and use that counter
in a LabelFormat directive.  See below.

> You didn't mention the docs, so perhaps these will help.
> 
> http://www.bacula.org/5.0.x-manuals/en/misc/misc/Variable_Expansion.html
> http://www.bacula.org/5.0.x-manuals/en/main/main/Configuring_Director.html#SECTION001819

Thanks, I've read those (multiple times :-)

>> So I specify a catalog and save the counter in the
>> database.  I write a before job script to reset
>> the counter to its minimumvalue.  
>> 
>> But although the script seems to be working, it has 
>> no effect.  Even if I change the counter value in the 
>> database by hand after the director has started but
>> before running the job, the job uses the old counter 
>> value.  Is it possible that the director reads the 
>> counter value at startup, maintains it internally, 
>> and only writes back to the database when its 
>> incremented?
> 
> It is difficult to judge a script we have not seen.  :)

The script is irrelevant.

Add a (db persistent) counter to a bacula-dir.conf 
file, eg;

   Counter {
Name = MyCtr
Minimum = 1
Catalog = MyCatalog
}

Use that counter in a Pool resource LabelFormat
directive where the SD is set up to auto-label
new volumes:

LabelFormat = "${JobName}-${MyCtr+}"

Start the director (so that it will create the 
counter in the database), then stop the director.

Manually change the counter value:

  psql# UPDATE counters SET currentvalue=6 WHERE counter='MyCtr';

Start director and run a job.  Note that the label 
generated is "...-6".  Change the value of the counter

  psql# UPDATE counters SET currentvalue=3 WHERE counter='MyCtr';

Run another job and note that the the label generated 
this time is not "...-3" but is instead, "...-7".

Obviously, if Bacula does not ever re-read the counter 
value from the database, the most perfect counter-
changing script in the world run in a RunBeforeJob will 
have no effect.

If you still want to see my conf files and counter reset
script, I'll be happy to post them -- I just thought that
they provide the same information I give above in a more 
obfuscated form.  But if you think they'll be helpful,
fine.

To recap, I am hoping there is some way of having Bacula 
auto-label volumes with first label in a *job* having 
a suffix of "-1", and if a second or subsequent volumes 
are necessary, gen

[Bacula-users] How do counters work?

2011-06-20 Thread Stuart McGraw
So I am generating backup volumes limited in size 
to fit on a DVD.  Since I use automatic volume labeling
and some backups result in multiple volumes, I include
a counter in the label name.  I want its value to be
1 for the first volume of the job, 2 for the second, 
etc.

First problem: counter does not get reset per job
but only when director is restarted.  (This strikes 
me as particularly useless behavior... is not the 
most frequent (only?) use of counters in a label?
Why would one want a value in a long-lived label
dependent on an arbitrary event like a service 
restart?  Maybe I am missing something). 

So I specify a catalog and save the counter in the
database.  I write a before job script to reset
the counter to its minimumvalue.  

But although the script seems to be working, it has 
no effect.  Even if I change the counter value in the 
database by hand after the director has started but
before running the job, the job uses the old counter 
value.  Is it possible that the director reads the 
counter value at startup, maintains it internally, 
and only writes back to the database when its 
incremented?

Please tell me I'm wrong!

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Fileset: How exclude all except...

2011-06-20 Thread Stuart McGraw
On 06/18/2011 01:37 PM, Andrea Conti wrote:
>> I want to exclude all dot files in home directories 
>> ("/home/*/.*"), *except* the directories "/home/*/.backup/".
>> 
>> Any hints on how to do this?
> 
> If you want to exclude dot _files_ (i.e. you don't care about
> directories whose name starts with a dot other than .backup), and
> assuming you're backing up the whole /home directory, this would be enough:
> 
> FileSet
> {
>Include
>{
>   Options
>   {
>  exclude = yes
>  wildfile = "/home/*/.*"
>   }
>   File = /home
>}
> }

But this will backup .thunderbird/ with its 800MB
mail cache, yes?  That's what I want to avoid (without
having to maintain a list of specific black-listed
files/directories.)

> If you also wish to exclude other dot-directories, I would try something
> like:
> 
> FileSet
> {
>Include
>{
>   Options
>   {
>  wilddir = "/home/*/.backup"
>   }
>   Options
>   {
>  exclude = yes
>  wild = "/home/*/.*"
>   }
>   File = /home
>}
> }

That's what I tried before (along with some 
permutations -- I admit to still not understanding
well how Bacula interprets Filesets.)  The .backup 
directory is included in the backed up files but its 
contents are not.

> Regex directives are another option, but IMHO they are a bit overkill
> for this problem.

I thought so too which is why I asked here. :-)

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Fileset: How exclude all except...

2011-06-18 Thread Stuart McGraw
On 06/16/2011 10:38 AM, Christian Manal wrote:
> Am 16.06.2011 18:12, schrieb Stuart McGraw:
>> I am having some difficulty specifying a fileset.
>> 
>> I want to exclude all dot files in home directories 
>> ("/home/*/.*"), *except* the directories "/home/*/.backup/".
>> 
>> Any hints on how to do this?
>
> I asked something simmilar a while back. Look here:
> 
><http://sourceforge.net/mailarchive/message.php?msg_id=27098562>

Thanks.  Scripting a file list dynamically is a little 
heavy-weight for what I was looking for though.

I was hoping that there was some way of saying "backup a/"
but exclude "a/b" but include "a/b/c", but exclude "a/b/c/d"...
i.e, includes and excludes could be cascaded somehow.

But from reading the documentation about 30 times and
the lack of response here, I conclude that it's not 
possible; one only gets one level of include/exclude.

I tried using an exclude regex, 

   regex = "^/home/[^/]+/\\.(?!backup(/|$))"

which should do what I want.  But bacula-dir complains it
is invalid.  

Does Bacula include it's own regex code?  Is it possible to
(easily) build it with a less-anemic regex library?  (I am 
using the stock Bacula-5.0.3 distributed in Fedora 15).

Finally (in case it helps someone else), I was able to use
a more basic regex that does the same as above but which is
obviously a lot less clear:
  Regex = 
"^/home/[^/]+/\\.([^b]|(b([^a]|$))|(ba([^c]|$))|(bac([^k]|$))|(back([^u]|$))|(backu([^p]|$))|(backup[^/]))"


 

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Fileset: How exclude all except...

2011-06-16 Thread Stuart McGraw
I am having some difficulty specifying a fileset.

I want to exclude all dot files in home directories 
("/home/*/.*"), *except* the directories "/home/*/.backup/".

Any hints on how to do this?


--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] DVD backup

2010-04-01 Thread Stuart McGraw
On 03/31/2010 07:27 PM, Phil Stracchino wrote:
>[...]
> DVD support is another issue.  Direct DVD writer support was deprecated
> in Bacula some time ago and is explicitly unmaintained and unsupported,
> because it turns out to be so problematic.  
>[...]

"Explicitly?"  Where would that be exactly?

I see in http://bacula.org/en/dev-manual/Current_State_Bacula.html

+ Advanced Support for most Storage Devices
[...]
* Supports writing to DVD.

If you search the main doc for "DVD" you will find it mentioned in
many places with nary a word about "unmaintained and unsupported",
There is even a subsection of the SD config section that describes 
how to configure a DVD storage device.
(http://bacula.org/5.0.x-manuals/en/main/main/Storage_Daemon_Configuratio.html#SECTION00195)
When I was first searching for a backup app with support for DVDs, 
I found hundreds of secondary sources recommending Bacula, none of
which mentioned that DVD media were "unmaintained and unsupported";
on the contrary they all said explicitly DVD media *were* supported.

I'm not complaining -- I already had a preexisting app for media
tracking so doing Bacula backups to file, then scripting their
migration to DVD outside of Bacula and using my media database
to link the DVD ids to the Bacula jobids is working fine.  But I 
do take exception to the claim that DVD non-support is explicit
and documented.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Some beginner Bacula questions (2nd try)

2010-03-09 Thread Stuart McGraw
On 03/09/2010 12:28 PM, John Drescher wrote:
> On Tue, Mar 9, 2010 at 2:17 PM, C M Reinehr  wrote:
>> On Tue 09 March 2010 12:19:40 pm John Drescher wrote:
>>> >I've always been a little unclear about the benefits of the .bsr
>>> > files myself but mine is a small business so I can't speak for those with
>>> > much larger, enterprise systems. They're small and are no trouble to back
>>> > up, so I keep them against the possibility that I might really need them
>>> > one day.
>>>
>>> They are most useful for restoring a corrupt catalog.
>>>
>>> John
>> Thanks! I knew there had to be a good reason and that I just hadn't yet
>> discovered it. :-)
>>
> 
> Also useful in disaster recovery when you do not have the database up
> and running.

Maybe I should have explained more...

Each of my backup jobs goes to a separate file named 
JobName-JobId-Level.  These are copied to DVD.  Only 
"user" files are backed up -- system files will be 
restored by re-installing the OS and apps.  I do a full
backup every two months with daily incrementals in between.

My bare-metal recovery plan is:
1. Install a Linux machine from distribution media.
2. Install Bacula (a copy of the source and conf files
 is on the backup DVDs).
3. Configure Postgresql, create bacula db.
4. Identify the volume with the latest catalog backup (which
 is easy to do given my volume naming scheme), extract the
 catalog db backup (with bextract) and restore to the db.
5. I now should be able to do a full restore of the user
 files, yes?

So why do I need the bsr files?  The only thing I will be
restoring without a catalog is the catalog itself and it
is in a single volume file.

This plan is admittedly time consuming but I can afford a 
couple days downtime (and I have found that I reinstall 
Linux (Fedora) pretty frequently anyway due to new
versions, and same with Windows which suffers from bit-
rot).

The main problem I have with it is the requirement for
a Linux machine in order to restore any of the Windows 
clients -- I would be much happier with Bacula if I could
restore a Windows client with only a Windows machine 
available. 

Does this seem like a workable plan?  (I have not tested 
it yet but will as soon as I can free up a spare disk and
some time.)

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Some beginner Bacula questions (2nd try)

2010-03-09 Thread Stuart McGraw
I asked this last week but no responses...

Anyone?

I am new at Bacula and am trying to work out a ]
reasonable scheme for backing up my home network.
I had some questions I hope someone can answer...

1) Sometimes my Bacula server machine is down at
   the scheduled backup time.  No problem, I just
   kick of the backup jobs manually the next morning.
   Is there some way to start all the jobs as though
   the time was last night?  Right now I start each
   of the five client jobs, and the catalog job
   individually.  (I was a little surprised there 
   is not something like a JobSet resource for
   aggregating several jobs into one schedulable
   unit.)
  
2) I write each job to a separate (file) backup volume
   (to be written to DVD later).  Is there any point
   to writing .bsr files?  They are for locating a 
   particular job within a volume that contains multiple
   jobs, yes?

3) Is there any supported way to change the labels of
   existing (file) volumes?  I have changed the label
   format several times and don't want to wait until
   some of the old volumes expire after a year to get
   rid of the volumes with "weird" names.

Thanks for any information/advice.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Some beginner Bacula questions

2010-03-05 Thread Stuart McGraw
Hello all,

I am new at Bacula and am trying to work out a ]
reasonable scheme for backing up my home network.
I had some questions I hope someone can answer...

1) Sometimes my Bacula server machine is down at
   the scheduled backup time.  No problem, I just
   kick of the backup jobs manually the next morning.
   Is there some way to start all the jobs as though
   the time was last night?  Right now I start each
   of the five client jobs, and the catalog job
   individually.  (I was a little surprised there 
   is not something like a JobSet resource for
   aggregating several jobs into one schedulable
   unit.)
  
2) I write each job to a separate (file) backup volume
   (to be written to DVD later).  Is there any point
   to writing .bsr files?  They are for locating a 
   particular job within a volume that contains multiple
   jobs, yes?

3) Is there any supported way to change the labels of
   existing (file) volumes?  I have changed the label
   format several times and don't want to wait until
   some of the old volumes expire after a year to get
   rid of the volumes with "weird" names.

Thanks for any information/advice.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] archive support?

2010-01-12 Thread Stuart McGraw
On 01/12/2010 12:46 AM, Ralf Gross wrote:
> Thomas Wakefield schrieb:
>> Take a directory, dump it to tape, and it will live forever (roughly
>> 5-10 years) on tape.  And the copy on disk will be deleted.  But if
>> needed, we could pull the copy back from tape.  We could possibly
>> write 2 copies to tape for redundancy.
>> 
>> I already use bacula to protect over 100TB of spinning disk.  But i
>> have multiple TB of data that my users "might" want to use again,
>> but most likely they don't need it.
> 
> We have the same problems here. Large sets of data that might never be
> touched again. To backup this, I setup a second client entry for each
> of the server with a different retention time (30y). After an archive
> was backed up (with a dump of the DB) to tape I change the status of
> the last tape from append to used and put all tapes in a safe.

I am just starting to use Bacula but one of my interests is
using it to archive old data also.

Is there any Bacula development policy regarding the compatibility
of new versions of the software with old media?  Will I be able
to restore from my Bacula-2.4.4 tapes or dvds with Bacula-6.3 in 
2017?  (Obviously sans media degradation.)

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] how to label a dvd?

2010-01-11 Thread Stuart McGraw
On 01/11/2010 09:21 AM, John Drescher wrote:
> On Mon, Jan 11, 2010 at 10:38 AM, Stuart McGraw  wrote:
>> I am trying to use Bacula for first time and want to
>> use DVD+R media.
> 
> DVD writing in bacula is problematic at best. I do not recommend using
> it directly. Instead create 4.2 GB disk volumes and use your favorite
> dvd writing program to archive the disk volumes to DVD.

Thanks, but could you (or someone) expand on this?  I looked 
back over the list archive, but the discussions seem pretty
vague and generally trail off without a conclusion.  Also they
seemed pretty old (2.4.2) so I wonder how relevant they still 
are.  (I am using 2.4.4 currently).

Is there a summary somewhere of what these problems are?  
The Bacula manual and billion web pages recommending Bacula
all say DVDs are supported and presumably work ok.  If not 
the case, shouldn't the Bacula web site and manual be updated 
to say so?

Are the problems due to Bacula or the tools (growisofs et.al.)
that Bacula relies on?

One of the reasons I liked Bacula is the catalog database,
particularly because some of my backups will actually be 
archives (kept for a long time).  If I manually copy file 
volumes to DVD then I loose some of the advantages of having
a catalog database, yes?  That is, rather than being able
to find a specific DVD (by ID number) needed for a restore,
I will now only be given some file volume IDs and I will
need to manage the mapping between them and DVD ID numbers
myself? (I already do that with my existing home-brew 
backup scheme and wanted to use Bacula to get away from 
that!)

Anyway, I would still like to play around with backups 
direct to DVD so if someone can answer my original 
question:

> Because it [DVD] has to be mounted for Bacula to use it,  
> I have to write some file system to the blank DVD first, 
> yes?  
> How do I do that?  I have tried using "growisofs -Z 
> /dev/dvd -R -J somefile" but that produces a "finalized" 
> (right term?) disk that Bacula can't write to. 

I would appreciate it.


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] how to label a dvd?

2010-01-11 Thread Stuart McGraw
Hello,

I realize this is a really dumb question, but I have 
not been able to find an answer by googling (or if I
did, I didn't understand it, :-)

I am trying to use Bacula for first time and want to 
use DVD+R media.  I've never used DVD media before and 
don't understand how to get Bacula to label them.  
Because it has to be mounted for Bacula to use it, I 
have to write some file system to the blank DVD first, 
yes?  

How do I do that?  I have tried using "growisofs -Z 
/dev/dvd -R -J somefile" but that produces a "finalized" 
(right term?) disk that Bacula can't write to.  I have 
read the growisofs and mkisofs man pages but they might 
as well be greek.  What is the magic incantation to get 
a DVD+R disk that Bacula can write a label to?

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users