Re: [Bacula-users] error connecting to database

2015-08-04 Thread Tim Dunphy
Hey Ana,

​Nice to hear from you too!​
>

:-D



>
> Is this the same?
>
> dbname = "bacula"; dbuser = "admin_ssl"; dbpassword = "secret"; dbaddress
> = "db.example.com"; dbport = 3306
>

 Yep! It's exactly the same in my config:

bname = "bacula"; dbuser = "admin_ssl"; dbpassword = "secret"; dbaddress = "
db.example.com"; dbport = 3306



>
> ​This is your second try (from your first post), including dbport
> directive (I just saw this in your first try).​
>
> ​Also, could you try the mysql this way?
>
> #mysql -uadmin_ssl -p -h db.example.com -P 3306 -D bacula -e "show tables"
>

Sure! And that works!

[root@ops:~] #mysql -uadmin_ssl -p -h db.example.com -P 3306 -D bacula -e
"show tables" | head -5
Enter password:
Tables_in_bacula
BaseFiles
CDImages
Client
Counters

Still unclear as to why this isn't working unfortunately. Still open to
more ideas. :-)

Tim


On Tue, Aug 4, 2015 at 10:14 PM, Ana Emília M. Arruda <
emiliaarr...@gmail.com> wrote:

> Hello Tim,
>
> ​Nice to hear from you too!​
>
> Is this the same?
>
> dbname = "bacula"; dbuser = "admin_ssl"; dbpassword = "secret"; dbaddress
> = "db.example.com"; dbport = 3306
>
> ​This is your second try (from your first post), including dbport
> directive (I just saw this in your first try).​
>
> ​Also, could you try the mysql this way?
>
> #mysql -uadmin_ssl -p -h db.example.com -P 3306 -D bacula -e "show tables"
>
> Regards,
> Ana​
>
>
> Em ter, 4 de ago de 2015 às 23:01, Tim Dunphy 
> escreveu:
>
>> Hey Ana,
>>
>>  Nice to hear from you!
>>
>> Tried that:
>>
>>
>> Catalog {
>>   Name = MyCatalog
>> # Uncomment the following line if you want the dbi driver
>>   #dbdriver = "dbi:mysql"; dbaddress = "db.example.com"; dbport = 3306
>>   dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret";
>> dbaddress = "db.example.com"; dbport = 3306
>> }
>>
>> And restarted. Same result unfortunately! :(
>>
>> [root@ops:~] #tail -f /var/log/bacula/bacula.log
>> Database=bacula User=admin_ssl
>> MySQL connect failed either server not running or your authorization is
>> incorrect.
>> 05-Aug 01:59 bacula-dir ERROR TERMINATION
>> Please correct configuration file: /etc/bacula/bacula-dir.conf
>> 05-Aug 01:59 bacula-dir JobId 0: Fatal error: Could not open Catalog
>> "MyCatalog", database "bacula".
>> 05-Aug 01:59 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to
>> connect to MySQL server.
>> Database=bacula User=admin_ssl
>> MySQL connect failed either server not running or your authorization is
>> incorrect.
>> 05-Aug 01:59 bacula-dir ERROR TERMINATION
>> Please correct configuration file: /etc/bacula/bacula-dir.conf
>>
>> Any more ideas?
>>
>> Thanks,
>> Tim
>>
>> On Tue, Aug 4, 2015 at 9:42 PM, Ana Emília M. Arruda <
>> emiliaarr...@gmail.com> wrote:
>>
>>> Hello Tim,
>>>
>>> Try this:
>>>
>>> Catalog {
>>>   Name = MyCatalog
>>>   dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret";
>>> dbaddress = "db.example.com"; dbport = 3306
>>> }
>>>
>>> Best regards,
>>> Ana
>>>
>>> On Tue, Aug 4, 2015 at 10:21 PM, Tim Dunphy 
>>> wrote:
>>>
 Hey guys,

 I have no trouble at all getting the bacula director running if I
 connect to a local datbase running on the bacula server itself.

 However if I try connecting to a database living on another host is
 where I run into an isssue.

 If I try to setup a database that's not running on localhost, this is
 what I get in the logs:

 05-Aug 01:14 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to
 connect to MySQL server.
 Database=bacula User=admin_ssl
 MySQL connect failed either server not running or your authorization is
 incorrect.
 05-Aug 01:14 bacula-dir ERROR TERMINATION
 Please correct configuration file: /etc/bacula/bacula-dir.conf

 This is how I tried to specify this in the director config:

 # Generic catalog service
 Catalog {
   Name = MyCatalog
 # Uncomment the following line if you want the dbi driver
   dbdriver = "dbi:mysql"; dbaddress = "db.example.com"; dbport = 3306
   dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret"
 }

 I also tried specifying it this way:

 # Generic catalog service
 Catalog {
   Name = MyCatalog
 # Uncomment the following line if you want the dbi driver
   #dbdriver = "dbi:mysql"; dbaddress = "db.jokefire.com"; dbport = 3306
   dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret" ;
 dbaddress = "db.example.com"
 }

 With the exact same result in the logs.

 I have verified that I can connect to the database I'm trying to
 specify in the config on the command line using the same credentials:

 #mysql -uadmin_ssl -p -h db.example.com -e "show databases"
 Enter password:
 ++
 | Database   |
 ++
 | bacula |
 | certs  |
 | information_schema |
 | mysql

Re: [Bacula-users] error connecting to database

2015-08-04 Thread Ana Emília M . Arruda
Hello Tim,

Try this:

Catalog {
  Name = MyCatalog
  dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret";
dbaddress = "db.example.com"; dbport = 3306
}

Best regards,
Ana

On Tue, Aug 4, 2015 at 10:21 PM, Tim Dunphy  wrote:

> Hey guys,
>
> I have no trouble at all getting the bacula director running if I connect
> to a local datbase running on the bacula server itself.
>
> However if I try connecting to a database living on another host is where
> I run into an isssue.
>
> If I try to setup a database that's not running on localhost, this is what
> I get in the logs:
>
> 05-Aug 01:14 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to
> connect to MySQL server.
> Database=bacula User=admin_ssl
> MySQL connect failed either server not running or your authorization is
> incorrect.
> 05-Aug 01:14 bacula-dir ERROR TERMINATION
> Please correct configuration file: /etc/bacula/bacula-dir.conf
>
> This is how I tried to specify this in the director config:
>
> # Generic catalog service
> Catalog {
>   Name = MyCatalog
> # Uncomment the following line if you want the dbi driver
>   dbdriver = "dbi:mysql"; dbaddress = "db.example.com"; dbport = 3306
>   dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret"
> }
>
> I also tried specifying it this way:
>
> # Generic catalog service
> Catalog {
>   Name = MyCatalog
> # Uncomment the following line if you want the dbi driver
>   #dbdriver = "dbi:mysql"; dbaddress = "db.jokefire.com"; dbport = 3306
>   dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret" ;
> dbaddress = "db.example.com"
> }
>
> With the exact same result in the logs.
>
> I have verified that I can connect to the database I'm trying to specify
> in the config on the command line using the same credentials:
>
> #mysql -uadmin_ssl -p -h db.example.com -e "show databases"
> Enter password:
> ++
> | Database   |
> ++
> | bacula |
> | certs  |
> | information_schema |
> | mysql  |
> | performance_schema |
> ++
>
> Can someone please let me know where I am going wrong in the config?
>
> Thanks!
> Tim
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>
>
> --
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] error connecting to database

2015-08-04 Thread Tim Dunphy
Hey guys,

I have no trouble at all getting the bacula director running if I connect
to a local datbase running on the bacula server itself.

However if I try connecting to a database living on another host is where I
run into an isssue.

If I try to setup a database that's not running on localhost, this is what
I get in the logs:

05-Aug 01:14 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to connect
to MySQL server.
Database=bacula User=admin_ssl
MySQL connect failed either server not running or your authorization is
incorrect.
05-Aug 01:14 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

This is how I tried to specify this in the director config:

# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
  dbdriver = "dbi:mysql"; dbaddress = "db.example.com"; dbport = 3306
  dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret"
}

I also tried specifying it this way:

# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
  #dbdriver = "dbi:mysql"; dbaddress = "db.jokefire.com"; dbport = 3306
  dbname = "bacula";  dbuser = "admin_ssl"; dbpassword = "secret" ;
dbaddress = "db.example.com"
}

With the exact same result in the logs.

I have verified that I can connect to the database I'm trying to specify in
the config on the command line using the same credentials:

#mysql -uadmin_ssl -p -h db.example.com -e "show databases"
Enter password:
++
| Database   |
++
| bacula |
| certs  |
| information_schema |
| mysql  |
| performance_schema |
++

Can someone please let me know where I am going wrong in the config?

Thanks!
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Deadlock error

2015-08-04 Thread Craig Shiroma
BTW, I suppose there could've been two jobs for the host(s) in scheduling
queue.  If this was the case, is there a way to find out after the fact?
If this did actually happen, what could cause duplicate jobs to be
scheduled on the same day at the same time?  I know no one manually ran the
jobs in question.  Again, this only was a problem for a few of the jobs
that ran last night, not all of them and some to do accurate backup and
some not.

Regards,
-craig

On Tue, Aug 4, 2015 at 9:27 AM, Craig Shiroma 
wrote:

> Hello,
>
> I had a few backups fail last night with the following error:
>
> 2015-08-03 18:02:46bacula-dir JobId 123984: b INTO File (FileIndex, JobId,
> PathId, FilenameId, LStat, MD5, DeltaSeq) SELECT batch.FileIndex,
> batch.JobId, Path.PathId, Filename.FilenameId,batch.LStat, batch.MD5,
> batch.DeltaSeq FROM batch JOIN Path ON (batch.Path = Path.Path) JOIN
> Filename ON (batch.Name = Filename.Name): ERR=Deadlock found when trying to
> get lock; try restarting transaction
>
> The only thing I did yesterday was switch a bunch of backups to use
> Accurate backup and restart bacula-dir and bacula-sd after that.  However,
> the above problem also occurred on some hosts that was not set to use
> Accurate backup.  From the log, it seems like two jobs for this host was
> scheduled to run at 18:00 because the second job started and found a
> duplicate job (job 123984) and canceled the backup.  I know there were no
> jobs running before 18:00 so 123984 was not an old job still running.  Same
> with the other jobs that were canceled because of the above situation.
>
> Anyway, does anyone have an idea what would cause this, especially how the
> second job got shot into the system.  After the deadlock error, Bacula said
> it would reschedule the job.  However the second job started right after
> the deadlock error instead of one hour later which makes me think that
> there were two jobs for this host scheduled to run at 18:00.
>
> Thank you in advance,
> -craig
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Deadlock error

2015-08-04 Thread Craig Shiroma
Hello,

I had a few backups fail last night with the following error:

2015-08-03 18:02:46bacula-dir JobId 123984: b INTO File (FileIndex, JobId,
PathId, FilenameId, LStat, MD5, DeltaSeq) SELECT batch.FileIndex,
batch.JobId, Path.PathId, Filename.FilenameId,batch.LStat, batch.MD5,
batch.DeltaSeq FROM batch JOIN Path ON (batch.Path = Path.Path) JOIN
Filename ON (batch.Name = Filename.Name): ERR=Deadlock found when trying to
get lock; try restarting transaction

The only thing I did yesterday was switch a bunch of backups to use
Accurate backup and restart bacula-dir and bacula-sd after that.  However,
the above problem also occurred on some hosts that was not set to use
Accurate backup.  From the log, it seems like two jobs for this host was
scheduled to run at 18:00 because the second job started and found a
duplicate job (job 123984) and canceled the backup.  I know there were no
jobs running before 18:00 so 123984 was not an old job still running.  Same
with the other jobs that were canceled because of the above situation.

Anyway, does anyone have an idea what would cause this, especially how the
second job got shot into the system.  After the deadlock error, Bacula said
it would reschedule the job.  However the second job started right after
the deadlock error instead of one hour later which makes me think that
there were two jobs for this host scheduled to run at 18:00.

Thank you in advance,
-craig
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula_t selinux problem

2015-08-04 Thread Craig Shiroma
Hi Simone,

Thank you for the info!  That's great!

-craig

On Mon, Aug 3, 2015 at 10:33 PM, Simone Caronni 
wrote:

> Hello,
>
> On 4 August 2015 at 03:37, Craig Shiroma 
> wrote:
>
>> Many (if not all) have the permissions srw-rw-rw- on the object.  With
>> bacula_t set to permissive, the errors don't seem to occur.  Besides the
>> restore problem which I can get around and the one above, are there any
>> other problems with leaving bacula_t enforced?  Is the problem above
>> something to be worried about?  I rather leave bacula_t enforced if
>> possible (unless it is not recommended).
>>
>
> I've been running Bacula with SELinux in enforcing mode for a few years
> now and did not have any issue. Error on sockets are not a problem, you can
> ignore those. They are created when the program starts.
>
> Regards,
> --Simone
>
>
>
>
> --
> You cannot discover new oceans unless you have the courage to lose sight
> of the shore (R. W. Emerson).
>
> http://xkcd.com/229/
> http://negativo17.org/
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Copy Volume (disk) for the tape.

2015-08-04 Thread Ana Emília M . Arruda
Hello Leandro,

Since you have two drives, you can have two jobs writing at the same time,
each one writing to one volume in one of your drives. You can also have
jobs writing at the same volume/drive, if you configure data spool for the
jobs. In this case, only one job will be writing to the tape at a specific
time, but others will be writing to the spool area. Once data in the spool
area becomes ready, for a job, they are moved to tape. This will cause data
interleaving in your tape volumes and could cause slower restores.

>From your post, it seems you have two jobs running concurrently in your two
drives.

Best regards,
Ana

On Tue, Aug 4, 2015 at 1:19 PM, Leandro César 
wrote:

>
> ​I need to make a copy of certain Pools (disk) for the tape.
>
> Some information:​
>
> *Pool to be copied:*
> *Pool {*
> *  Name = Semanal*
> *  Pool Type = Backup*
> *  Recycle = yes*
> *  AutoPrune = yes*
> *  Volume Use Duration = 77 hours*
> *  Volume Retention = 10 days*
> *  Storage = Disco-Semanal*
> *  Label Format = "Semanal-${NumVols}"*
> *  Next Pool = Copia-Semanal*
> *}*
>
> *Pool destination:*
>
> *Pool {*
> *  Name = Copia-Semanal*
> *  Pool Type = Backup*
> *  AutoPrune = yes*
> *  Volume Use Duration = 5 days*
> *  Volume Retention = 10 days*
> *  Recycle = yes*
> *  Cleaning Prefix = "CLN"*
> *  Storage = Autochanger*
> *}*
>
> *​Job copy:*
>
> *Job {*
> *  Name = "Copia Semanal"*
> *  JobDefs = "jobdefs_default"*
> *  Client = "x.com.br "*
> *  FileSet="x_files"*
> *  Schedule = "copia-semanal_schedule"*
> *  Type = Copy*
> *  Pool = Semanal*
> *  Storage = Disco-Semanal*
> *  Selection Type = PoolUncopiedJobs*
> *  Priority = 10*
> *}*
>
> *Schedule {*
> *  Name = "copia-semanal_schedule"*
> *  Run = Level=Full Pool=Semanal NextPool=Copia-Semanal
> Storage=Autochanger mon at 20:00*
> *}*
>
>
> *​Running manually (bconsole, run) the following options are listed:*
>
> *Run Copy job*
> *JobName:   Copia Semanal*
> *Bootstrap: *None**
> *Client:x.com.br *
> *FileSet:   x_files*
> *Pool:  Semanal (From Job resource)*
> *NextPool:  Copia-Semanal (From Job Pool's NextPool resource)*
> *Read Storage:  Disco-Semanal (From Pool resource)*
> *Write Storage: Autochanger (From Job Pool's NextPool resource)*
> *JobId: *None**
> *When:  2015-08-03 21:16:41*
> *Catalog:   MyCatalog*
> *Priority:  10*
>
> *I can run the copy, but only one Job at a time:*
>
> *​* status dir*
>
> *Running Jobs:*
> *Console connected at 03-Aug-15 21:16*
> * JobId  Type Level Files Bytes  Name  Status*
> *==*
> *  4777  Copy Full  0 0  Copia Semanal is waiting
> execution*
> *  4778  Copy Full  0 0  Copia Semanal is running*
> *  4779  Back Full  0 0  d_files is running*
> *  4780  Copy Full  0 0  Copia Semanal is waiting on
> Storage "Disco-Semanal"*
> *  4781  Back Full  0 0  _files  is waiting on
> Storage "Autochanger"*
> *  4782  Copy Full  0 0  Copia Semanal is waiting on
> Storage "Disco-Semanal"*
> *  4783  Back Full  0 0  _files   is waiting on
> Storage "Autochanger"*
> *  4784  Copy Full  0 0  Copia Semanal is waiting on
> Storage "Disco-Semanal"*
> *  4785  Back Full  0 0  _filesis waiting on
> Storage "Autochanger"*
> *  4786  Copy Full  0 0  Copia Semanal is waiting on
> Storage "Disco-Semanal"*
> *  4787  Back Full  0 0  _files is waiting on
> Storage "Autochanger"*
> *  4788  Copy Full  0 0  Copia Semanal is waiting on
> Storage "Disco-Semanal"*
> *  4789  Back Full  0 0  _filesis waiting on
> Storage "Autochanger"*
> *  4790  Copy Full  0 0  Copia Semanal is waiting on
> Storage "Disco-Semanal"*
> *  4791  Back Full  0 0  _files  is waiting on Storage
> "Autochanger"*
>
>
>
> *how to run simultaneous Jobs in this case?Device and Storage settings:*
> ​
> ​*Autochanger {*
> *  Name = Autochanger*
> *  Device = Drive-1, Drive-2*
> *  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"*
> *  Changer Device = /dev/sg5*
> *}*
>
> *Device {*
> *  Name = Drive-1*
> *  Drive Index = 0*
> *  Media Type = LTO5*
> *  Archive Device = /dev/st1*
> *  AutomaticMount = yes;   # when device opened, read it*
> *  AlwaysOpen = yes;*
> *  RemovableMedia = yes;*
> *  RandomAccess = no;*
> *  AutoChanger = yes*
> *  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"*
> *  Maximum Concurrent Jobs = 50*
> *#  Alert Command = "sh -c 'smartctl -H -l error %c'"*
> *}*
>
> *Device {*
> *  Name = Drive-2*
> *  Drive Index = 1*
> *  Media Type = LTO5*
> *  Archive Device = /dev/st0*
> *  AutomaticMount 

Re: [Bacula-users] Bacula BLOCKED waiting for mount

2015-08-04 Thread Michael Schwager
Actually, the restore jobs were in the 900-range. 687 was indeed the backup
job, as I can see that the numbers before and closely following it were all
backup jobs in the same data range (I didn't do my restore until months
later).

It was that restore process that taught me how to manage my Bacula
Directory so as to avoid bscan's in the future. But it's good to know that
I can restore without restoring the info in the catalog.

(also I learned that Backups are useless. It's the restore I care about
.
At work we no longer talk about our "backup infrastructure", we talk about
our "restore infrastructure").



*- Mike Schwager*

*  Linux Network Engineer, Mocho Trading LLC*
*  312-646-4783 Phone312-637-0011 Cell312-957-9804 Fax*


On Tue, Aug 4, 2015 at 7:30 AM, Ana Emília M. Arruda  wrote:

> Hello Michael,
>
> When you use bscan to restore jobs and files information from a volume
> into catalog, a new jobid is created for the original jobid (the jobid that
> used the volume for its backup). This is why you have the JobId 687 and not
> the original one. This is the JobId that you will find in your Job table.
> And this is the jobId that Bacula will tie to your media in JobMedia table.
>
> If the bscan operation is usual for you, I would recommend you to have an
> Admin Job doing prune operations of your jobs scheduled in an adequate
> date/time for your environment.
>
> Also, I would remember you that you can use bls/bextrac/bscan to restore
> the directories/files without restoring the volume/job info into catalog.
>
> Best regards,
> Ana
>
> On Mon, Aug 3, 2015 at 7:15 PM, Michael Schwager <
> mschwa...@mochotrading.com> wrote:
>
>> On Sun, Aug 2, 2015 at 5:43 PM, Michael Schwager <
>> mschwa...@mochotrading.com> wrote:
>>
>>> Starngely, we have another tape that SHOULD be available. Tapes in this
>>> pool are set to recycle after 90 days, and 90 days ago from today is May
>>> 4th.
>>> ​ We have a tape that was last written to on March 28. So why would
>>> Bacula block on the unavailable tape?
>>>
>>
>> ​To answer my own question (with help from the other denizens of the
>> Bacula-cave): ​
>>
>> A couple of months ago I needed to do a restore, but I had set some of
>> the retention times too short. So the files for my Job were not in the
>> database any longer. I scanned the tape and got the data back into the
>> database. I'm not exactly sure what I'd done or why it broke, but I can
>> tell you that the JobMedia database rows included references to JobId 687,
>> and that was the ID of a job that contained my file. In any case, I'm sure
>> these old references were what caused Bacula to not be able to mark the
>> tape as recyclable, and it thought the tape was in use, so it requested the
>> next tape in line (EPW681L3).
>>
>> I'm beginning to learn about the reasons why behind the warnings not to
>> purge, and to let Bacula manage everything, and so on. At this point I
>> think my Bacula is where I want it and I can move forward.
>>
>> Thank you all for your help, suggestions, and patience.
>>
>>
>> *- Mike Schwager*
>>
>> *  Linux Network Engineer, Mocho Trading LLC*
>> *  312-646-4783 <312-646-4783> Phone312-637-0011 <312-637-0011>
>> Cell312-957-9804 <312-957-9804> Fax*
>>
>>
>> This message is for the named person(s) use only. It may contain
>> confidential proprietary or legally privileged information. No
>> confidentiality or privilege is waived or lost by any mistransmission. If
>> you receive this message in error, please immediately delete it and all
>> copies of it from your system, destroy any hard copies of it and notify the
>> sender. You must not, directly or indirectly use, disclose, distribute,
>> print, or copy any part of this message if you are not the intended
>> recipient. Mocho Trading LLC reserves the right to monitor all e-mail
>> communications through its networks. Any views expressed in this message
>> are those of the individual sender, except where the message states
>> otherwise and the sender is authorized to state them to be the views of any
>> such entity.
>>
>>
>> --
>>
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>>
>

-- 
This message is for the named person(s) use only. It may contain 
confidential proprietary or legally privileged information. No 
confidentiality or privilege is waived or lost by any mistransmission. If 
you receive this message in error, please immediately delete it and all 
copies of it from your system, destroy any hard copies of it and notify the 
sender. You must not, directly or indirectly use, disclose, distribute, 
print, or copy any part of this message if you are not the intended 
recipient. Mocho Trading LLC r

[Bacula-users] Copy Volume (disk) for the tape.

2015-08-04 Thread Leandro César
​I need to make a copy of certain Pools (disk) for the tape.

Some information:​

*Pool to be copied:*
*Pool {*
*  Name = Semanal*
*  Pool Type = Backup*
*  Recycle = yes*
*  AutoPrune = yes*
*  Volume Use Duration = 77 hours*
*  Volume Retention = 10 days*
*  Storage = Disco-Semanal*
*  Label Format = "Semanal-${NumVols}"*
*  Next Pool = Copia-Semanal*
*}*

*Pool destination:*

*Pool {*
*  Name = Copia-Semanal*
*  Pool Type = Backup*
*  AutoPrune = yes*
*  Volume Use Duration = 5 days*
*  Volume Retention = 10 days*
*  Recycle = yes*
*  Cleaning Prefix = "CLN"*
*  Storage = Autochanger*
*}*

*​Job copy:*

*Job {*
*  Name = "Copia Semanal"*
*  JobDefs = "jobdefs_default"*
*  Client = "x.com.br "*
*  FileSet="x_files"*
*  Schedule = "copia-semanal_schedule"*
*  Type = Copy*
*  Pool = Semanal*
*  Storage = Disco-Semanal*
*  Selection Type = PoolUncopiedJobs*
*  Priority = 10*
*}*

*Schedule {*
*  Name = "copia-semanal_schedule"*
*  Run = Level=Full Pool=Semanal NextPool=Copia-Semanal Storage=Autochanger
mon at 20:00*
*}*


*​Running manually (bconsole, run) the following options are listed:*

*Run Copy job*
*JobName:   Copia Semanal*
*Bootstrap: *None**
*Client:x.com.br *
*FileSet:   x_files*
*Pool:  Semanal (From Job resource)*
*NextPool:  Copia-Semanal (From Job Pool's NextPool resource)*
*Read Storage:  Disco-Semanal (From Pool resource)*
*Write Storage: Autochanger (From Job Pool's NextPool resource)*
*JobId: *None**
*When:  2015-08-03 21:16:41*
*Catalog:   MyCatalog*
*Priority:  10*

*I can run the copy, but only one Job at a time:*

*​* status dir*

*Running Jobs:*
*Console connected at 03-Aug-15 21:16*
* JobId  Type Level Files Bytes  Name  Status*
*==*
*  4777  Copy Full  0 0  Copia Semanal is waiting
execution*
*  4778  Copy Full  0 0  Copia Semanal is running*
*  4779  Back Full  0 0  d_files is running*
*  4780  Copy Full  0 0  Copia Semanal is waiting on
Storage "Disco-Semanal"*
*  4781  Back Full  0 0  _files  is waiting on
Storage "Autochanger"*
*  4782  Copy Full  0 0  Copia Semanal is waiting on
Storage "Disco-Semanal"*
*  4783  Back Full  0 0  _files   is waiting on Storage
"Autochanger"*
*  4784  Copy Full  0 0  Copia Semanal is waiting on
Storage "Disco-Semanal"*
*  4785  Back Full  0 0  _filesis waiting on
Storage "Autochanger"*
*  4786  Copy Full  0 0  Copia Semanal is waiting on
Storage "Disco-Semanal"*
*  4787  Back Full  0 0  _files is waiting on
Storage "Autochanger"*
*  4788  Copy Full  0 0  Copia Semanal is waiting on
Storage "Disco-Semanal"*
*  4789  Back Full  0 0  _filesis waiting on
Storage "Autochanger"*
*  4790  Copy Full  0 0  Copia Semanal is waiting on
Storage "Disco-Semanal"*
*  4791  Back Full  0 0  _files  is waiting on Storage
"Autochanger"*



*how to run simultaneous Jobs in this case?Device and Storage settings:*
​
​*Autochanger {*
*  Name = Autochanger*
*  Device = Drive-1, Drive-2*
*  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"*
*  Changer Device = /dev/sg5*
*}*

*Device {*
*  Name = Drive-1*
*  Drive Index = 0*
*  Media Type = LTO5*
*  Archive Device = /dev/st1*
*  AutomaticMount = yes;   # when device opened, read it*
*  AlwaysOpen = yes;*
*  RemovableMedia = yes;*
*  RandomAccess = no;*
*  AutoChanger = yes*
*  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"*
*  Maximum Concurrent Jobs = 50*
*#  Alert Command = "sh -c 'smartctl -H -l error %c'"*
*}*

*Device {*
*  Name = Drive-2*
*  Drive Index = 1*
*  Media Type = LTO5*
*  Archive Device = /dev/st0*
*  AutomaticMount = yes;   # when device opened, read it*
*  AlwaysOpen = yes;*
*  RemovableMedia = yes;*
*  RandomAccess = no;*
*  AutoChanger = yes*
*  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"*
*  Maximum Concurrent Jobs = 50*
*#  Alert Command = "sh -c 'smartctl -H -l error %c'"*



*Storage {*
*  Name = "Autochanger"*
*  Address = .com.br # N.B. Use a
fully qualified name here*
*  SDPort = 9103*
*  Password = "Lnouwl2LIZ2/alZpV2bVFhs6ZqOWn9/vr7zHmX7AMCil"  #
password for Storage daemon*
*  Device = "Autochanger"   # must be same as Device in Storage
daemon*
*  Media Type = LTO5# must be same as MediaType in Storage
daemon*
*  Autochanger = yes  # enable for autochanger device*
*  Maximum Concurrent Jobs = 100*
*}*​

-- 
--
Att,
Leandro César
--

Re: [Bacula-users] Problem bcopy tape to tape

2015-08-04 Thread Eric Bourguinat
Some new tests : tape to file then file to tape

1 - Tape to file (the restore of files from this tape works correctly)

root@vms7:/media/tape-storage# sudo /usr/local/bacula/sbin/bcopy -dt -c 
/usr/local/allibtools/backup/tape/bacula-sd.conf -b 
/usr/local/bacula/var/bacula/working/copie-bande.bsr -o tape-storage 
/dev/nst0 /media/tape-storage/
bcopy: butil.c:289-0 Using device: "/dev/nst0" for reading.
04-Aug 09:37 bcopy JobId 0: Ready to read from volume 
"Archive-Bacula-1489" on tape device "Copie.Bande.vms7" (/dev/nst0).
bcopy: butil.c:287-0 Using device: "/media/tape-storage/" for writing.
04-Aug 09:37 bcopy JobId 0: Labeled new Volume "tape-storage" on file 
device "tape-storage" (/media/tape-storage/).
04-Aug 09:37 bcopy JobId 0: Wrote label to prelabeled Volume 
"tape-storage" on file device "tape-storage" (/media/tape-storage/)
bcopy: bcopy.c:247-0 Volume label not copied.
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-16386 
newEndBlock=48126 oldEndFile=0 newEndFile=1
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-33003 
newEndBlock=31509 oldEndFile=1 newEndFile=2
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-49475 
newEndBlock=15037 oldEndFile=2 newEndFile=3
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-1463 
newEndBlock=63049 oldEndFile=3 newEndFile=4
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-17915 
newEndBlock=46597 oldEndFile=4 newEndFile=5
...
...
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-29117 
newEndBlock=35395 oldEndFile=91 newEndFile=92
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-45962 
newEndBlock=18550 oldEndFile=92 newEndFile=93
bcopy: block.c:304-0 Incorrect EndBlock/EndFile oldEndBlock=-62758 
newEndBlock=1754 oldEndFile=93 newEndFile=94
04-Aug 12:01 bcopy JobId 0: End of Volume at file 465 on device 
"Copie.Bande.vms7" (/dev/nst0), Volume "Archive-Bacula-1489"
04-Aug 12:01 bcopy JobId 0: End of all volumes.
bcopy: bcopy.c:287-0 EOT label not copied.
bcopy: bcopy.c:211-0 83 Jobs copied. 26457714 records copied.


With /usr/local/bacula/var/bacula/working/copie-bande.bsr:
Volume=Archive-Bacula-1489|

2 - File to tape

root@vms7:/media/tape-storage# sudo /usr/local/bacula/sbin/bcopy -dt -c 
/usr/local/allibtools/backup/tape/bacula-sd.conf -b 
/usr/local/bacula/var/bacula/working/copie-bande.bsr -o 
Archive-Bacula-1489 /media/tape-storage/ /dev/nst0
bcopy: butil.c:289-0 Using device: "/media/tape-storage/" for reading.
04-Aug 13:25 bcopy JobId 0: Ready to read from volume "tape-storage" on 
file device "tape-storage" (/media/tape-storage/).
bcopy: butil.c:287-0 Using device: "/dev/nst0" for writing.
04-Aug 13:25 bcopy JobId 0: Error: The Volume=Archive-Bacula-1489 on 
device="Copie.Bande.vms7" (/dev/nst0) appears to be unlabeled.
04-Aug 13:25 bcopy JobId 0: Labeled new Volume "Archive-Bacula-1489" on 
tape device "Copie.Bande.vms7" (/dev/nst0).
04-Aug 13:26 bcopy JobId 0: Wrote label to prelabeled Volume 
"Archive-Bacula-1489" on tape device "Copie.Bande.vms7" (/dev/nst0)
bcopy: bcopy.c:247-0 Volume label not copied.
04-Aug 16:03 bcopy JobId 0: End of Volume at file 94 on device 
"tape-storage" (/media/tape-storage/), Volume "tape-storage"
04-Aug 16:03 bcopy JobId 0: End of all volumes.
bcopy: bcopy.c:287-0 EOT label not copied.
bcopy: bcopy.c:211-0 83 Jobs copied. 26457714 records copied.


With /usr/local/bacula/var/bacula/working/copie-bande.bsr:
Volume=tape-storage|


If I try to restore files from this new copy tape, I can't.

2015-08-04 16:3bacula-dir JobId 50604: Bacula bacula-dir 7.0.5 (28Jul14):
   Build OS:   x86_64-unknown-linux-gnu debian 8.1
   JobId:  50604
   Job:Restore.2015-08-04_16.29.56_44
   Restore Client: atlas
   Start time: 04-août-2015 16:29:58
   End time:   04-août-2015 16:32:11
   Files Expected: 5
   Files Restored: 0
   Bytes Restored: 0
   Rate:   0.0 KB/s
   FD Errors:  0
   FD termination status:  OK
   SD termination status:  OK
   Termination:Restore OK -- warning file count mismatch


Questions:
- why do I get "Incorrect EndBlock/EndFile" in first step?
- why "File expected" != "File Restored"  when I try to restore from the 
second tape?
- why "Termination" status is "Restore OK" and not "Error"?

Thanks.

Regards,

Eric




--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula BLOCKED waiting for mount

2015-08-04 Thread Ana Emília M . Arruda
Hello Michael,

When you use bscan to restore jobs and files information from a volume into
catalog, a new jobid is created for the original jobid (the jobid that used
the volume for its backup). This is why you have the JobId 687 and not the
original one. This is the JobId that you will find in your Job table. And
this is the jobId that Bacula will tie to your media in JobMedia table.

If the bscan operation is usual for you, I would recommend you to have an
Admin Job doing prune operations of your jobs scheduled in an adequate
date/time for your environment.

Also, I would remember you that you can use bls/bextrac/bscan to restore
the directories/files without restoring the volume/job info into catalog.

Best regards,
Ana

On Mon, Aug 3, 2015 at 7:15 PM, Michael Schwager  wrote:

> On Sun, Aug 2, 2015 at 5:43 PM, Michael Schwager <
> mschwa...@mochotrading.com> wrote:
>
>> Starngely, we have another tape that SHOULD be available. Tapes in this
>> pool are set to recycle after 90 days, and 90 days ago from today is May
>> 4th.
>> ​ We have a tape that was last written to on March 28. So why would
>> Bacula block on the unavailable tape?
>>
>
> ​To answer my own question (with help from the other denizens of the
> Bacula-cave): ​
>
> A couple of months ago I needed to do a restore, but I had set some of the
> retention times too short. So the files for my Job were not in the database
> any longer. I scanned the tape and got the data back into the database. I'm
> not exactly sure what I'd done or why it broke, but I can tell you that the
> JobMedia database rows included references to JobId 687, and that was the
> ID of a job that contained my file. In any case, I'm sure these old
> references were what caused Bacula to not be able to mark the tape as
> recyclable, and it thought the tape was in use, so it requested the next
> tape in line (EPW681L3).
>
> I'm beginning to learn about the reasons why behind the warnings not to
> purge, and to let Bacula manage everything, and so on. At this point I
> think my Bacula is where I want it and I can move forward.
>
> Thank you all for your help, suggestions, and patience.
>
>
> *- Mike Schwager*
>
> *  Linux Network Engineer, Mocho Trading LLC*
> *  312-646-4783 <312-646-4783> Phone312-637-0011 <312-637-0011>
> Cell312-957-9804 <312-957-9804> Fax*
>
>
> This message is for the named person(s) use only. It may contain
> confidential proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission. If
> you receive this message in error, please immediately delete it and all
> copies of it from your system, destroy any hard copies of it and notify the
> sender. You must not, directly or indirectly use, disclose, distribute,
> print, or copy any part of this message if you are not the intended
> recipient. Mocho Trading LLC reserves the right to monitor all e-mail
> communications through its networks. Any views expressed in this message
> are those of the individual sender, except where the message states
> otherwise and the sender is authorized to state them to be the views of any
> such entity.
>
>
> --
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Backup restore

2015-08-04 Thread Ana Emília M . Arruda
Hello Ankush,

Yes, it is possible. You can run the restore command and change the
"restore client" option to any host that you want Bacula restore files
into. In these servers you will need bacula file daemon instaled ok?

Best regards,
Ana

On Tue, Aug 4, 2015 at 1:41 AM, More, Ankush 
wrote:

> Hi Team,
>
> I want to restore backup of one Linux and window client to different Linux
> and Window server for testing.
> Is it possible?
> If yes then what command I should use or need any configuration changes?
> Can I initiate restore from client?
>
> Thank you,
> Ankush More
>
>
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient, you
> are not authorized to read, print, retain, copy, disseminate, distribute,
> or use this message or any part thereof. If you receive this message in
> error, please notify the sender immediately and delete all copies of this
> message.
>
>
>
> --
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] MaxWaitTime and auto cancel a job waiting for a tape?

2015-08-04 Thread Ana Emília M . Arruda
Set your Max Wait Time to 5 minutes (or any value greater than). This is
the default time for mtx-changer script for tape drive operations and the
default value for Maximum Changer/Rewind/Open Wait directives for a device
resource.

Best regards,
Ana

On Tue, Aug 4, 2015 at 7:10 AM, jalil1408 
wrote:

> bconsole cancel command cancels jobs manually using jobid!
>
> I need to cancel it automatically and immediately when it requires a tape,
> and no tape or not the expected tape is in the drive?
>
> +--
> |This was sent by jalil1...@gmail.com via Backup Central.
> |Forward SPAM to ab...@backupcentral.com.
> +--
>
>
>
>
> --
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] MaxWaitTime and auto cancel a job waiting for a tape?

2015-08-04 Thread jalil1408
bconsole cancel command cancels jobs manually using jobid! 

I need to cancel it automatically and immediately when it requires a tape, and 
no tape or not the expected tape is in the drive?

+--
|This was sent by jalil1...@gmail.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] MaxWaitTime and auto cancel a job waiting for a tape?

2015-08-04 Thread Andreas Nastke
# bconsole
Connecting to Director 195.27.99.93:9101
1000 OK: reliant1-dir Version: 5.0.3 (04 August 2010)
Enter a period to cancel a command.
*help
   Command   Description
   ===   ===
   add   Add media to a pool
   autodisplay   Autodisplay console messages
   automount Automount after label
   cancelCancel a job
   createCreate DB Pool from resource
   deleteDelete volume, pool or job
   disable   Disable a job
   enableEnable a job
   estimate  Performs FileSet estimate, listing gives full listing
   exit  Terminate Bconsole session
   gui   Non-interactive gui mode
   help  Print help on specific command
   label Label a tape
   list  List objects from catalog
   llist Full or long list like list command
   messages  Display pending messages
   memoryPrint current memory usage
   mount Mount storage
   prune Prune expired records from catalog
   purge Purge records from catalog
   pythonPython control commands
   quit  Terminate Bconsole session
   query Query catalog
   restore   Restore files
   relabel   Relabel a tape
   release   Release storage
   reloadReload conf file
   run   Run a job
   statusReport status
   setdebug  Sets debug level
   setip Sets new client address -- if authorized
   show  Show resource records
   sqlquery  Use SQL to query catalog
   time  Print current time
   trace Turn on/off trace to file
   unmount   Unmount storage
   umountUmount - for old-time Unix guys, see unmount
   updateUpdate volume, pool or stats
   use   Use catalog xxx
   var   Does variable expansion
   version   Print Director version
   wait  Wait until no jobs are running

When at a prompt, entering a period cancels the command.

You have messages.
*help cancel
   Command   Description
   ===   ===
   cancelCancel a job

Arguments:
 jobid= job= ujobid=

When at a prompt, entering a period cancels the command.

*

jalil1408 schrieb:
> So how to auto cancel a job waiting for a tape?
> 
> +--
> |This was sent by jalil1...@gmail.com via Backup Central.
> |Forward SPAM to ab...@backupcentral.com.
> +--
> 
> 
> 
> --
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Mit besten Grüßen / Kind Regards

Andreas Nastke
IT System Management

g/d/p Markt- und Sozialforschung GmbH
Ein Unternehmen der Forschungsgruppe g/d/p
Richardstr. 18
D-22081 Hamburg
Fon: +49 (0)40 / 29876-117
Fax: +49 (0)40 / 29876-127
nas...@gdp-group.com
www.gdp-group.com

Sitz der Gesellschaft ist Hamburg, Handelsregister Hamburg, HRB 40482
Geschäftsführer: Christa Braaß, Volker Rohweder

---
This e-mail may contain confidential and/or privileged information.  If
you are not the intended recipient please notify the sender and  delete
this e-mail from your whole system. Any unauthorised copying, disclosure
or distribution of the material in this e-mail is strictly forbidden.
---

--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula_t selinux problem

2015-08-04 Thread Simone Caronni
Hello,

On 4 August 2015 at 03:37, Craig Shiroma  wrote:

> Many (if not all) have the permissions srw-rw-rw- on the object.  With
> bacula_t set to permissive, the errors don't seem to occur.  Besides the
> restore problem which I can get around and the one above, are there any
> other problems with leaving bacula_t enforced?  Is the problem above
> something to be worried about?  I rather leave bacula_t enforced if
> possible (unless it is not recommended).
>

I've been running Bacula with SELinux in enforcing mode for a few years now
and did not have any issue. Error on sockets are not a problem, you can
ignore those. They are created when the program starts.

Regards,
--Simone




-- 
You cannot discover new oceans unless you have the courage to lose sight of
the shore (R. W. Emerson).

http://xkcd.com/229/
http://negativo17.org/
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] MaxWaitTime and auto cancel a job waiting for a tape?

2015-08-04 Thread jalil1408
Will "Maximum Open Wait" do the trick?

+--
|This was sent by jalil1...@gmail.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] MaxWaitTime and auto cancel a job waiting for a tape?

2015-08-04 Thread jalil1408
So how to auto cancel a job waiting for a tape?

+--
|This was sent by jalil1...@gmail.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users