[bareos-users] Ovirt snapshot keeps getting bigger after each snapshot

2020-04-29 Thread Team_Orbit
Hello everyone, we noticed that the snapshot of our vm keeps getting bigger 
after each full backup. The strange part is, that there isn't any kind of 
data traffic going on so the size should stay the same. example: 

 NameBackup type Status  Date  
Datesize
VM-Name |  F  |T | 2020-03-22 23:20:52 
| 2020-03-22 23:34:22 | 12096108
VM-Name |  F  |T | 2020-03-29 23:24:57 
| 2020-03-29 23:41:50 | 14998316


Does anybody know what the reason could be, because we cannot figure it out 
on our own.

kind regards

Team Orbit

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/1006342b-a2d4-4162-9944-0b277226bea0%40googlegroups.com.


[bareos-users] Re: Bareos data encryption

2020-04-29 Thread Valentin Dzhorov
Hey guys, thank you all for the replies and suggestions. I have just tried 
and created an incremental backup of one client using these settings. I 
have unencrypted backups of that client prior to this test however and I 
wonder if that may be the issue even though common sense dictates that it 
should not be the case. After that, I've tried restoring it to another 
client and from the log I got:

29-Apr 16:09 client1 JobId 131: Error: filed/crypto.cc:183 Missing 
cryptographic signature for /tmp/bareos-restores//root/info.php
29-Apr 16:09 bareos-dir JobId 131: Error: Bareos bareos-dir 19.2.7 
(16Apr20):

However, the file I tried to restore on the other client was restored 
successfully (even though the job reported that it was failure) and it is 
clearly not encrypted. 

In reply to Spadajspadaj: My master.pem file contains only the public key, 
the private key is not included anywhere in configuration and it is stored 
in a safe place. I am even more
stumped on what the issue might be here :)

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/a1e96d99-d54e-42d4-9498-a2960cb2f905%40googlegroups.com.


Re: [bareos-users] Bareos data encryption

2020-04-29 Thread Erich Eckner

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi Valentin,

I have a working setup with encryption over here.

On Wed, 29 Apr 2020, Valentin Dzhorov wrote:


Ok, so I am trying to turn on data encryption feature described
here: https://docs.bareos.org/TasksAndConcepts/DataEncryption.html. I have
issued RSA public and private key and I have consolidated them into one PEM
file. My configuration on the client itself looks like the following:
Client {
  Name = client1
  Maximum Concurrent Jobs = 10
  Maximum Bandwidth Per Job = 90 m/s


  # remove comment from "Plugin Directory" to load plugins from specified
directory.
  # if "Plugin Names" is defined, only the specified plugins will be loaded,
  # otherwise all storage plugins (*-fd.so) from the "Plugin Directory".
  #
  Plugin Directory = /usr/lib64/bareos/plugins
    # Plugin Names = ""


  # if compatible is set to yes, we are compatible with bacula
  # if set to no, new bareos features are enabled which is the default
  # compatible = yes


  PKI Signatures = yes
  PKI Encryption = yes
  PKI Keypair    =
"/etc/bareos/bareos-fd.d/certificate/assembled/consolidated.pem"
  PKI Master Key = "/etc/bareos/bareos-fd.d/certificate/master.pem"
  PKI Cipher     = aes128
  }


My config looks similar, except, that I do not provide the "master.pem", 
but solely the "master.cert" - what's the content of your "master.pem": 
does it contain the private key, too? That is not necessary and may break 
things - additionally, this is wrong from a security point of view: you do 
*not* want to distribute the private master key across all your clients.




However when I am doing backups nothing seems to happen. I get the following
message when doing backups:

Encryption: None

Can anyone let me know what am I doing wrong here? Thank you all in advance!


Additionally to my point above: have you checked file permissions? Can 
bareos read the private keys?


regards,
Erich

-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEE3p92iMrPBP64GmxZCu7JB1Xae1oFAl6pby4ACgkQCu7JB1Xa
e1qo5g/+ORdkI51kmJYzt//L91cBxETOhns0BYH2xA4Q5CXO2mMLyYhCSR+osr7g
dAkhDcLWvXOUpSOsrNm2ZUo7ejwLlJ4ovSpfX5dOgJq1U5njG3VBPMSwGO2IXaPN
RfDMt5D3VeplfQJKtnJon1wPltEwnfY6hUqp3stRDVHbfHyV0UpNyGN4kMwPUR6H
RlkxoUWmCOkT2c/YFDkf6d/vTThXKtXt10NjhX38kJoW7GEjikiBZMz/3U1eN7ay
pbwgtAm5Gg+xY3R39sQHRbhDtXUuykA8JPvnCztk2vyq7y+MOxIprAnsMUQr83UM
8egi1TwH1nUhsr1Mg7IDnOxJxWIFx8m77N28o1SaCnS4DibPY+vLhwvasOxl7XxM
XWEO4RqieofH93TrPYxOhIcJRRb3e9kVERav/gViYf+vGzb1HM48QCLJDY/iSINk
WN01cJKzGrkU6bKqsI6DP1ISgYg2e8src8kwPd58fh0wTQhrpYDh7i8joYY8Pweo
r9V02YqiCXH+fkgFZCYkZPCORSI0hF1XKV/BPHo0NfOE8vtt54/Rn/CmBmzvWc8c
jbjWjYXARn/mcEptjbCOMYO9SAIqKu0mZbGEMEU0DySxphgDpdu21oPUCkYC8yfQ
qi684/NvI0u3Bd9KbKJRPqjbHfdY8FF6ETzXiLd3z2rkalVwG7w=
=1SiK
-END PGP SIGNATURE-

--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/alpine.LNX.2.22.419.2004291410040.10703%40desk.ddns.eckner.net.


Re: [bareos-users] Bareos data encryption

2020-04-29 Thread Spadajspadaj



On 29.04.2020 14:09, Andreas Rogge wrote:

Am 29.04.20 um 13:22 schrieb Valentin Dzhorov:

Can anyone let me know what am I doing wrong here? Thank you all in advance!

That really depends on where you see the "Encryption: None" message.
In Bareos' context encryption can mean three different things:
- the PKI-based encryption of the backed up data (which is what you're
trying)
- the transport encryption (SSL) between dir, fd and sd
- hardware-assisted tape-encryption

I think you're seeing the message because the director cannot establish
a secure connection to the FD. However, PKI-based content-encryption may
still take place.

To test content-encryption you can try a restore of the data to another
client that has no access to the required key material.
It's also useful to check the job status. The Encryption field of the 
job status should contain info whether the job's been encrypted or not.


--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/50ff9529-35ba-0d83-e0a1-7bd8f4d043e6%40gmail.com.


Re: [bareos-users] Bareos data encryption

2020-04-29 Thread Andreas Rogge
Am 29.04.20 um 13:22 schrieb Valentin Dzhorov:
> 
> Can anyone let me know what am I doing wrong here? Thank you all in advance!
That really depends on where you see the "Encryption: None" message.
In Bareos' context encryption can mean three different things:
- the PKI-based encryption of the backed up data (which is what you're
trying)
- the transport encryption (SSL) between dir, fd and sd
- hardware-assisted tape-encryption

I think you're seeing the message because the director cannot establish
a secure connection to the FD. However, PKI-based content-encryption may
still take place.

To test content-encryption you can try a restore of the data to another
client that has no access to the required key material.

Best Regards,
Andreas
-- 
Andreas Rogge andreas.ro...@bareos.com
  Bareos GmbH & Co. KG  Phone: +49 221-630693-86
  http://www.bareos.com

  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
  Komplementär: Bareos Verwaltungs-GmbH
  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/1d96c04b-7b06-8c68-3620-f7a63c10d8c8%40bareos.com.


signature.asc
Description: OpenPGP digital signature


Re: [bareos-users] Bareos 19.2 TLS error running job

2020-04-29 Thread Luc Duriez
So that was it

The password between bares-dir/storage conf didn't correspond to the one in 
bareos-sd/director conf

Thanks again

Le mercredi 29 avril 2020 13:47:59 UTC+2, Luc Duriez a écrit :
>
> Hello Frank, thanks for you're reply.
>
> I did and go the following error :
> Connecting to Storage daemon storage_remoteserver at 192.168.21.95:9103
>
>
> Failed to connect to Storage daemon storage_remoteserver.
>
> So it seems to be the point, I will investigate on it.
>
> Thank you
>
> Le mercredi 29 avril 2020 13:14:25 UTC+2, Frank Ueberschar a écrit :
>>
>> You may want to try "status sd" that queries the storage daemon as well. 
>> Am 29.04.20 um 12:20 schrieb Luc Duriez:
>>
>> Hello,
>>
>> I update from bareos 18.2 to 19.2 and I have the following error when 
>> running a job :
>>
>> bareos-dir JobId 28: Fatal error: Connect failure: ERR=error:140943FC:SSL 
>> routines:SSL3_READ_BYTES:sslv3 alert bad record mac
>>
>> Fun fact when I do a status client in bconsole the TLS handshake is ok :
>>
>> Connecting to Client remoteserver-fd at remoteserver.domain.prod:9102
>>  Handshake: Immediate TLS, Encryption: PSK-AES256-CBC-SHA
>>
>>
>> remoteserver-fd Version: 19.2.7 (16 April 2020)  Linux-3.10.0-1062.18.
>> 1.el7.x86_64 debian Debian GNU/Linux 8.11 (jessie)
>> Daemon started 29-Apr-20 12:04. Jobs: run=0 running=0, bareos.org build 
>> binary
>>  Sizeof: boffset_t=8 size_t=8 debug=0 trace=0 bwlimit=0kB/s
>> Plugin Info:
>>  Plugin : python-fd.so
>>  Description: Python File Daemon Plugin
>>  Version: 3, Date: May 2014
>>  Author : Marco van Wieringen
>>  License: Bareos AGPLv3
>>  Usage  : python:module_path=:module_name=<
>> python-module-to-load>:...
>>
>>
>>  Plugin : bpipe-fd.so
>>  Description: Bareos Pipe File Daemon Plugin
>>  Version: 2, Date: January 2014
>>  Author : Kern Sibbald
>>  License: Bareos AGPLv3
>>  Usage  : bpipe:file=:reader=:writer=<
>> writeprogram>
>>  readprogram runs on backup and its stdout is saved
>>  writeprogram runs on restore and gets restored data into stdin
>>  the data is internally stored as filepath (e.g. mybackup/backup1)
>>
>> Is some one have a solution or at least some clues ?
>>
>> Both bareos-dir and fd are 19.2.7 version under debian jessie 8.11
>>
>> Regards
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "bareos-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to bareos...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bareos-users/600b94da-69e9-4efa-b87e-2b014cdbc218%40googlegroups.com
>>  
>> 
>> .
>>
>> -- 
>> Mit freundlichen Grüßen
>>
>>  Frank Ueberschar  frank.u...@bareos.com
>>  Bareos GmbH & Co. KG  Phone: +49 221 63 06 93-88
>>  http://www.bareos.com Fax:   +49 221 63 06 93-10
>>
>>  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
>>  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, P. Storz
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/d9a984cb-6a5a-409b-8a69-5a3bace454d0%40googlegroups.com.


Re: [bareos-users] Bareos 19.2 TLS error running job

2020-04-29 Thread Luc Duriez
Hello Frank, thanks for you're reply.

I did and go the following error :
Connecting to Storage daemon storage_remoteserver at 192.168.21.95:9103


Failed to connect to Storage daemon storage_remoteserver.

So it seems to be the point, I will investigate on it.

Thank you

Le mercredi 29 avril 2020 13:14:25 UTC+2, Frank Ueberschar a écrit :
>
> You may want to try "status sd" that queries the storage daemon as well. 
> Am 29.04.20 um 12:20 schrieb Luc Duriez:
>
> Hello,
>
> I update from bareos 18.2 to 19.2 and I have the following error when 
> running a job :
>
> bareos-dir JobId 28: Fatal error: Connect failure: ERR=error:140943FC:SSL 
> routines:SSL3_READ_BYTES:sslv3 alert bad record mac
>
> Fun fact when I do a status client in bconsole the TLS handshake is ok :
>
> Connecting to Client remoteserver-fd at remoteserver.domain.prod:9102
>  Handshake: Immediate TLS, Encryption: PSK-AES256-CBC-SHA
>
>
> remoteserver-fd Version: 19.2.7 (16 April 2020)  Linux-3.10.0-1062.18.
> 1.el7.x86_64 debian Debian GNU/Linux 8.11 (jessie)
> Daemon started 29-Apr-20 12:04. Jobs: run=0 running=0, bareos.org build 
> binary
>  Sizeof: boffset_t=8 size_t=8 debug=0 trace=0 bwlimit=0kB/s
> Plugin Info:
>  Plugin : python-fd.so
>  Description: Python File Daemon Plugin
>  Version: 3, Date: May 2014
>  Author : Marco van Wieringen
>  License: Bareos AGPLv3
>  Usage  : python:module_path=:module_name=<
> python-module-to-load>:...
>
>
>  Plugin : bpipe-fd.so
>  Description: Bareos Pipe File Daemon Plugin
>  Version: 2, Date: January 2014
>  Author : Kern Sibbald
>  License: Bareos AGPLv3
>  Usage  : bpipe:file=:reader=:writer=<
> writeprogram>
>  readprogram runs on backup and its stdout is saved
>  writeprogram runs on restore and gets restored data into stdin
>  the data is internally stored as filepath (e.g. mybackup/backup1)
>
> Is some one have a solution or at least some clues ?
>
> Both bareos-dir and fd are 19.2.7 version under debian jessie 8.11
>
> Regards
> -- 
> You received this message because you are subscribed to the Google Groups 
> "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bareos...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bareos-users/600b94da-69e9-4efa-b87e-2b014cdbc218%40googlegroups.com
>  
> 
> .
>
> -- 
> Mit freundlichen Grüßen
>
>  Frank Ueberschar  frank.u...@bareos.com 
>  Bareos GmbH & Co. KG  Phone: +49 221 63 06 93-88
>  http://www.bareos.com Fax:   +49 221 63 06 93-10
>
>  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
>  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, P. Storz
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/3e560e52-f7b5-4429-854d-21c7373679bd%40googlegroups.com.


[bareos-users] Bareos data encryption

2020-04-29 Thread Valentin Dzhorov
Ok, so I am trying to turn on data encryption feature described here: 
https://docs.bareos.org/TasksAndConcepts/DataEncryption.html. I have issued 
RSA public and private key and I have consolidated them into one PEM file. 
My configuration on the client itself looks like the following:

Client {
  Name = client1
  Maximum Concurrent Jobs = 10
  Maximum Bandwidth Per Job = 90 m/s


  # remove comment from "Plugin Directory" to load plugins from specified 
directory.
  # if "Plugin Names" is defined, only the specified plugins will be loaded,
  # otherwise all storage plugins (*-fd.so) from the "Plugin Directory".
  #
  Plugin Directory = /usr/lib64/bareos/plugins
# Plugin Names = ""


  # if compatible is set to yes, we are compatible with bacula
  # if set to no, new bareos features are enabled which is the default
  # compatible = yes


  PKI Signatures = yes
  PKI Encryption = yes
  PKI Keypair= 
"/etc/bareos/bareos-fd.d/certificate/assembled/consolidated.pem"
  PKI Master Key = "/etc/bareos/bareos-fd.d/certificate/master.pem"
  PKI Cipher = aes128
  }

However when I am doing backups nothing seems to happen. I get the 
following message when doing backups:

Encryption: None

Can anyone let me know what am I doing wrong here? Thank you all in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/44ea185b-9f76-4cb7-adaa-13f83671b10d%40googlegroups.com.


Re: [bareos-users] Bareos 19.2 TLS error running job

2020-04-29 Thread Frank Ueberschar

You may want to try "status sd" that queries the storage daemon as well.

Am 29.04.20 um 12:20 schrieb Luc Duriez:

Hello,

I update from bareos 18.2 to 19.2 and I have the following error when 
running a job :


|
bareos-dir JobId28:Fatalerror:Connectfailure:ERR=error:140943FC:SSL 
routines:SSL3_READ_BYTES:sslv3 alert bad record mac

|

Fun fact when I do a status client in bconsole the TLS handshake is ok :

|
Connectingto Clientremoteserver-fd at remoteserver.domain.prod:9102
Handshake:ImmediateTLS,Encryption:PSK-AES256-CBC-SHA


remoteserver-fd 
Version:19.2.7(16April2020)Linux-3.10.0-1062.18.1.el7.x86_64 debian 
DebianGNU/Linux8.11(jessie)

Daemonstarted 29-Apr-2012:04.Jobs:run=0running=0,bareos.org build binary
Sizeof:boffset_t=8size_t=8debug=0trace=0bwlimit=0kB/s
PluginInfo:
Plugin:python-fd.so
Description:PythonFileDaemonPlugin
Version:3,Date:May2014
Author:Marcovan Wieringen
License:BareosAGPLv3
Usage:python:module_path=:module_name=:...


Plugin:bpipe-fd.so
Description:BareosPipeFileDaemonPlugin
Version:2,Date:January2014
Author:KernSibbald
License:BareosAGPLv3
Usage:bpipe:file=:reader=:writer=
 readprogram runs on backup andits stdout issaved
 writeprogram runs on restore andgets restored data intostdin
 the data isinternally stored asfilepath (e.g.mybackup/backup1)
|

Is some one have a solution or at least some clues ?

Both bareos-dir and fd are 19.2.7 version under debian jessie 8.11

Regards
--
You received this message because you are subscribed to the Google 
Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to bareos-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/600b94da-69e9-4efa-b87e-2b014cdbc218%40googlegroups.com 
.


--
Mit freundlichen Grüßen

 Frank Ueberschar  frank.uebersc...@bareos.com
 Bareos GmbH & Co. KG  Phone: +49 221 63 06 93-88
 http://www.bareos.com Fax:   +49 221 63 06 93-10

 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, P. Storz

--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/f5cb71cc-5848-b5e0-99dd-d0c72e9c7fd3%40bareos.com.


[bareos-users] Bareos 19.2 TLS error running job

2020-04-29 Thread Luc Duriez
Hello,

I update from bareos 18.2 to 19.2 and I have the following error when 
running a job :

bareos-dir JobId 28: Fatal error: Connect failure: ERR=error:140943FC:SSL 
routines:SSL3_READ_BYTES:sslv3 alert bad record mac

Fun fact when I do a status client in bconsole the TLS handshake is ok :

Connecting to Client remoteserver-fd at remoteserver.domain.prod:9102
 Handshake: Immediate TLS, Encryption: PSK-AES256-CBC-SHA


remoteserver-fd Version: 19.2.7 (16 April 2020)  Linux-3.10.0-1062.18.
1.el7.x86_64 debian Debian GNU/Linux 8.11 (jessie)
Daemon started 29-Apr-20 12:04. Jobs: run=0 running=0, bareos.org build 
binary
 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0 bwlimit=0kB/s
Plugin Info:
 Plugin : python-fd.so
 Description: Python File Daemon Plugin
 Version: 3, Date: May 2014
 Author : Marco van Wieringen
 License: Bareos AGPLv3
 Usage  : python:module_path=:module_name=<
python-module-to-load>:...


 Plugin : bpipe-fd.so
 Description: Bareos Pipe File Daemon Plugin
 Version: 2, Date: January 2014
 Author : Kern Sibbald
 License: Bareos AGPLv3
 Usage  : bpipe:file=:reader=:writer=<
writeprogram>
 readprogram runs on backup and its stdout is saved
 writeprogram runs on restore and gets restored data into stdin
 the data is internally stored as filepath (e.g. mybackup/backup1)

Is some one have a solution or at least some clues ?

Both bareos-dir and fd are 19.2.7 version under debian jessie 8.11

Regards

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/600b94da-69e9-4efa-b87e-2b014cdbc218%40googlegroups.com.


Re: [bareos-users] Re: How to update from 17.2 to 18.2

2020-04-29 Thread Spadajspadaj
In short, yum history rollback is not a good way to do do anything other 
than very small package changes. i.e. downgrading from version 1.4.27 to 
1.4.26 of some package or completely removing package you just installed 
for testing along with all dependencies.


Longer explanation:

Yum history rollback just finds out which packages are to be installed 
(and in which versions) and which are to be removed. After that it 
simply downloads needed pakage files and runs appropriate install/remove 
actions. It's in no way similar to any "restore snapshot" operation. In 
case of files contained in the packages, the situation is easy - the 
"new" package installs new packages, then the files belonging to the 
"old" package but not belonging to "new" one are removed. Simple.


It gets more tricky with package scripts. RPM runs like this:

1. Runs pre-install script

2. Installs files

3. Runs post-install script

4. Runs pre-uninstall script

5. Removes files

6. Runs post-uninstall script


Steps 1-3 are run if there's any package installation or update 
(upgrade/downgrade) and steps 4-6 are run if there's any package removal 
(uninstall/upgrade/downgrade).


Bear with me, it's getting more magical :-)

The scripts executed during the operations are run almost completely 
without any additional environment or context. The only parameter is "a 
number representing the number of instances of the package currently 
installed on the system, /after/ the current package has been installed 
or erased" (http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html). This 
means that install scripts might be run with an argument of 1 (initial 
install) or 2 (upgrade/downgrade) since after the install stage the 
number of package instances on the system will be equal to those numbers 
and the uninstall scripts might be run with an argument of 0 (complete 
removal) or 1 (upgrade/downgrade) since that's how many instances of 
package will be left after the uninstall phase. There is probably an 
option for


You can see how it's used by querying a package with rpm -q --scripts. A 
good example here is an openssh-server package which runs some actions 
only on complete removal.


Unfortunately, the rpm scripts have no more context about the package 
versions (and don't have any reasonable way for querying the state of 
the rpm database in the middle of a transaction) so there is no way of 
knowing whether the update operation is an upgrade or downgrade. And we 
need also to remember than usually "big upgrades" invoke some "external" 
changes, like database schema upgrades, which are not easily 
rollbackable (as we said before - rpm rollback doesn't work on 
system-level snapshot). Therefore it's usually either assumed that 
update operation is indeed an upgrade one, not a downgrade. And it's a 
good practice to check prerequisites before executing needed "upgrade 
scripts" (like check database schema version beforehand as to not apply 
an upgrade script twice). Sometimes packagers just create a package with 
new files and tell you to upgrade the dependencies (like database 
schema) on your own.


So, long story short - no, there is no simple way to perform a yum 
history rollback and have a usable system if the upgrade had been "deep".


Therefore if you upgrade Bareos installation upgrade I'd do a full 
configuration backup and database dump to have a working state to which 
you can roll back.



Hope this wasn't too complicated :-)


On 28.04.2020 14:37, Goncalo Sousa wrote:

yum history rollback [id] doesn't do the job?

terça-feira, 28 de Abril de 2020 às 13:12:40 UTC+1, Oleg Volkov escreveu:

No, I am talking about rollback, reverting back to previous version.
Upgrading of production server suggest that you have any roll back
plan.
Anyway it is your choice, not mine.

--
You received this message because you are subscribed to the Google 
Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to bareos-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/34303ce5-505a-4f9c-b531-f9262b169689%40googlegroups.com 
.


--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/c1946b4a-a625-7a82-0b8b-8f5d9ae89c1b%40gmail.com.