Re: [Bacula-users] Automation restore backup job

2019-01-30 Thread Petar Kozic
Bill,
I’m glad to hear that you arrived well.
Thank you very much for this script.
I checked this script and if I understand well this code, here we need to
know JobID when we want to start auto restore, which we need to put in
command line parameters ?



On January 30, 2019 at 1:37:15 AM, Bill Arlofski (waa-bac...@revpol.com)
wrote:

On 1/23/19 4:53 AM, Petar Kozic wrote:
> Thank you Bill.
> Sure, I will contact you next week.
> Best regards.

On 1/29/19 1:56 AM, Petar Kozic wrote:> Hi Bill,
> just reminder to post your scripts :)
> Thank you !


Hello Petar,

Well, safely back home in the US, recovering from a very busy week and long
travel day back. :)

OK, for now, I have attached my AutoRestoreAndVeryfy.sh script.


It may be run from a RunScript in a Backup job or an Admin job, from cron,
or
even manually. You just need to make sure the correct command line
parameters
are supplied.

I think it is pretty well documented in comments near the top. Please take
a
look there to understand some of the details and limitations.

Currently it will restore the entire backup job, then run each type of
verify
job against the backup job. It will "wait" for each job to finish before
initiating the next. If you do not want any of the verify jobs and only
want
the restore job, it is just a matter of removing or commenting all of those
steps.

At some point, perhaps after some feedback and additional modifications I
will
post it to my website, but for now, I just wanted to get this out there to
you.

For example, I am thinking that I might want to add the ability to specify
the
types of jobs to run on the command line, a different client to restore to,
etc.

I have been running a version of this for a couple years now, and have just
made a couple minor modifications today, so I think it is pretty stable.

All comments and suggestions welcome!


Best regards,

Bill


-- 
Bill Arlofski
http://www.revpol.com/bacula
-- Not responsible for anything below this line --
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Automation restore backup job

2019-01-29 Thread Bill Arlofski

On 1/23/19 4:53 AM, Petar Kozic wrote:

Thank you Bill.
Sure, I will contact you next week.
Best regards.


On 1/29/19 1:56 AM, Petar Kozic wrote:> Hi Bill,
> just reminder to post your scripts :)
> Thank you !


Hello Petar,

Well, safely back home in the US, recovering from a very busy week and long 
travel day back. :)


OK, for now, I have attached my AutoRestoreAndVeryfy.sh script.


It may be run from a RunScript in a Backup job or an Admin job, from cron, or 
even manually. You just need to make sure the correct command line parameters 
are supplied.


I think it is pretty well documented in comments near the top. Please take a 
look there to understand some of the details and limitations.


Currently it will restore the entire backup job, then run each type of verify 
job against the backup job. It will "wait" for each job to finish before 
initiating the next. If you do not want any of the verify jobs and only want 
the restore job, it is just a matter of removing or commenting all of those steps.


At some point, perhaps after some feedback and additional modifications I will 
post it to my website, but for now, I just wanted to get this out there to you.


For example, I am thinking that I might want to add the ability to specify the 
types of jobs to run on the command line, a different client to restore to, etc.


I have been running a version of this for a couple years now, and have just 
made a couple minor modifications today, so I think it is pretty stable.


All comments and suggestions welcome!


Best regards,

Bill


--
Bill Arlofski
http://www.revpol.com/bacula
-- Not responsible for anything below this line --


AutoRestoreAndVerify.sh
Description: application/shellscript
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Automation restore backup job

2019-01-29 Thread Petar Kozic
Hi Bill,
just reminder to post your scripts :)
Thank you !


On January 23, 2019 at 12:53:41 PM, Petar Kozic (petar.ko...@gmail.com)
wrote:

Thank you Bill.
Sure, I will contact you next week.
Best regards.

On January 23, 2019 at 12:46:18 PM, Bill Arlofski (waa-bac...@revpol.com)
wrote:

On 1/23/19 4:27 AM, Petar Kozic wrote:
> Hi folks,
> I try to find some solution on the internet but I found only parcial
> solution.
> I want to hear from you what you think about automation restore backup
> for test purpose.
>
> Indeed, I have about 25 linux instance which I backuping on my bacula
> server. My configuration files was splitted for every client in
particular.
> By, default every backup job for client have also defined restore job on
> same client.
>
> I want to create one test linux instance where I can randomly to start
> some restore from bacula to test instance to check does backup is ok.
> I will automate all other staff as start of test and check restore with
> some app as Jenkins or Ansible etc…
>
> I need solution on which way I can make some automation job for restore
> randomly client on my test instance, is that possible from bash and how,
> or maybe from mysql query and how etc...
>
> Thank’s in advanced.
>
> *—*
> *Petar Kozić*


Hello Petar,

I have a rather extensive script to not only do a restore like you ask,
but it can also automatically run all of the verifies jobs too..

I am currently in Switzerland at a company meeting, but when I get back
to my office next week, I can forward you this script...

And, now that I think about it, I will probably also post it to my
website with the rest of the Bacula-related scripts I have posted. :)

http://www.revpol.com/bacula has some other things that might be useful...

Please ping me next week if I forget to post it.

Best regards,

Bill

--
Bill Arlofski
Reverse Polarity, LLC
860-824-2433 Office
860-965-5110 Cell
http://www.revpol.com/
--
He picks up scraps of information
He's adept at adaptation

Learn about strong cryptography and how it can protect your personal
communications from the NSA's illegal spying programs here:
https://en.wikipedia.org/wiki/Pretty_Good_Privacy

This communication may be unlawfully collected and stored by the
National Security Agency (NSA) in secret. The parties to this email do
not consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you have received this
communication in error (or illegally - by mass collection and/or
spying), you are required to delete it immediately.

--
--
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --


___
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] Automation restore backup job

2019-01-23 Thread Petar Kozic
Thank you Bill.
Sure, I will contact you next week.
Best regards.

On January 23, 2019 at 12:46:18 PM, Bill Arlofski (waa-bac...@revpol.com)
wrote:

On 1/23/19 4:27 AM, Petar Kozic wrote:
> Hi folks,
> I try to find some solution on the internet but I found only parcial
> solution.
> I want to hear from you what you think about automation restore backup
> for test purpose.
>
> Indeed, I have about 25 linux instance which I backuping on my bacula
> server. My configuration files was splitted for every client in
particular.
> By, default every backup job for client have also defined restore job on
> same client.
>
> I want to create one test linux instance where I can randomly to start
> some restore from bacula to test instance to check does backup is ok.
> I will automate all other staff as start of test and check restore with
> some app as Jenkins or Ansible etc…
>
> I need solution on which way I can make some automation job for restore
> randomly client on my test instance, is that possible from bash and how,
> or maybe from mysql query and how etc...
>
> Thank’s in advanced.
>
> *—*
> *Petar Kozić*


Hello Petar,

I have a rather extensive script to not only do a restore like you ask,
but it can also automatically run all of the verifies jobs too..

I am currently in Switzerland at a company meeting, but when I get back
to my office next week, I can forward you this script...

And, now that I think about it, I will probably also post it to my
website with the rest of the Bacula-related scripts I have posted. :)

http://www.revpol.com/bacula has some other things that might be useful...

Please ping me next week if I forget to post it.

Best regards,

Bill

-- 
Bill Arlofski
Reverse Polarity, LLC
860-824-2433 Office
860-965-5110 Cell
http://www.revpol.com/
--
He picks up scraps of information
He's adept at adaptation

Learn about strong cryptography and how it can protect your personal
communications from the NSA's illegal spying programs here:
https://en.wikipedia.org/wiki/Pretty_Good_Privacy

This communication may be unlawfully collected and stored by the
National Security Agency (NSA) in secret. The parties to this email do
not consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you have received this
communication in error (or illegally - by mass collection and/or
spying), you are required to delete it immediately.

-- 
--
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --


___
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] Automation restore backup job

2019-01-23 Thread Bill Arlofski

On 1/23/19 4:27 AM, Petar Kozic wrote:

Hi folks,
I try to find some solution on the internet but I found only parcial 
solution.
I want to hear from you what you think about automation restore backup 
for test purpose.


Indeed, I have about 25 linux instance which I backuping on my bacula 
server. My configuration files was splitted for every client in particular.
By, default every backup job for client have also defined restore job on 
same client.


I want to create one test linux instance where I can randomly to start 
some restore from bacula to test instance to check does backup is ok.
I will automate all other staff as start of test and check restore with 
some app as Jenkins or Ansible etc…


I need solution on which way I can make some automation job for restore 
randomly client on my test instance, is that possible from bash and how, 
or maybe from mysql query and how etc...


Thank’s in advanced.

*—*
*Petar Kozić*



Hello Petar,

I have a rather extensive script to not only do a restore like you ask, 
but it can also automatically run all of the verifies jobs too..


I am currently in Switzerland at a company meeting, but when I get back 
to my office next week, I can forward you this script...


And, now that I think about it, I will probably also post it to my 
website with the rest of the Bacula-related scripts I have posted. :)


http://www.revpol.com/bacula has some other things that might be useful...

Please ping me next week if I forget to post it.

Best regards,

Bill

--
Bill Arlofski
Reverse Polarity, LLC
860-824-2433 Office
860-965-5110 Cell
http://www.revpol.com/
--
He picks up scraps of information
He's adept at adaptation

Learn about strong cryptography and how it can protect your personal 
communications from the NSA's illegal spying programs here: 
https://en.wikipedia.org/wiki/Pretty_Good_Privacy


This communication may be unlawfully collected and stored by the 
National Security Agency (NSA) in secret. The parties to this email do 
not consent to the retrieving or storing of this communication and any 
related metadata, as well as printing, copying, re-transmitting, 
disseminating, or otherwise using it. If you have received this 
communication in error (or illegally - by mass collection and/or 
spying), you are required to delete it immediately.


--
--
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --


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


[Bacula-users] Automation restore backup job

2019-01-23 Thread Petar Kozic
Hi folks,
I try to find some solution on the internet but I found only parcial
solution.
I want to hear from you what you think about automation restore backup for
test purpose.

Indeed, I have about 25 linux instance which I backuping on my bacula
server. My configuration files was splitted for every client in particular.
By, default every backup job for client have also defined restore job on
same client.

I want to create one test linux instance where I can randomly to start some
restore from bacula to test instance to check does backup is ok.
I will automate all other staff as start of test and check restore with
some app as Jenkins or Ansible etc…

I need solution on which way I can make some automation job for restore
randomly client on my test instance, is that possible from bash and how, or
maybe from mysql query and how etc...

Thank’s in advanced.

*—*
*Petar Kozić*
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users