Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TIBBackupService iwth encrypted database


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Last Post: Oct 16, 2015 9:14 AM Last Post By: Jeff Overcash (...
Yves Ganier

Posts: 10
Registered: 7/1/04
TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2015 5:52 AM
Hi,

We use TIBBackupService to backup databases on our client servers
Now we have a new encrypted database and we would use TIBBackupService with that DB again

We don't find how specify encryption values to the service
There is a TIBConfigService available but no documentation can be found

How we can manage this case

Thanks for your advice

Yves
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2015 9:11 AM   in response to: Yves Ganier in response to: Yves Ganier
Yves Ganier wrote:
Hi,

We use TIBBackupService to backup databases on our client servers
Now we have a new encrypted database and we would use TIBBackupService with that DB again

We don't find how specify encryption values to the service
There is a TIBConfigService available but no documentation can be found

How we can manage this case

Thanks for your advice

Yves

Been several years since I put it in but it should be these two properties

EncryptName - Encryption name
EncryptPassword - Encryption's password.

These are similar to what you'd pass to gbak.

This stack overflow article might help

http://stackoverflow.com/questions/22865260/backup-an-encrypted-database-with-gbak

also

http://docwiki.embarcadero.com/InterBase/XE7/en/Encrypting_Backup_Files
http://docwiki.embarcadero.com/InterBase/XE7/en/Additional_Guidelines_for_Encrypting_and_Decrypting_Database_Backup_Files

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)

Yves Ganier

Posts: 10
Registered: 7/1/04
Re: TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2015 9:45 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Jeff Overcash (TeamB) wrote:
Yves Ganier wrote:
Hi,

We use TIBBackupService to backup databases on our client servers
Now we have a new encrypted database and we would use TIBBackupService with that DB again

We don't find how specify encryption values to the service
There is a TIBConfigService available but no documentation can be found

How we can manage this case

Thanks for your advice

Yves

Been several years since I put it in but it should be these two properties

EncryptName - Encryption name
EncryptPassword - Encryption's password.

These are similar to what you'd pass to gbak.

This stack overflow article might help

http://stackoverflow.com/questions/22865260/backup-an-encrypted-database-with-gbak

also

http://docwiki.embarcadero.com/InterBase/XE7/en/Encrypting_Backup_Files
http://docwiki.embarcadero.com/InterBase/XE7/en/Additional_Guidelines_for_Encrypting_and_Decrypting_Database_Backup_Files

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)


thanks

EncryptName is a database's property, our goal is to use TIBBackupService to execute backup and in TIBBackupService we don't find where to put this parameter and the key itself

Using gbak as a command line we can user parameters -sep -encrypt but we prefer using TIBBackupService if possible

Yves
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 14, 2015 10:21 AM   in response to: Yves Ganier in response to: Yves Ganier
Yves Ganier wrote:
Jeff Overcash (TeamB) wrote:
Yves Ganier wrote:
Hi,

We use TIBBackupService to backup databases on our client servers
Now we have a new encrypted database and we would use TIBBackupService with that DB again

We don't find how specify encryption values to the service
There is a TIBConfigService available but no documentation can be found

How we can manage this case

Thanks for your advice

Yves
Been several years since I put it in but it should be these two properties

EncryptName - Encryption name
EncryptPassword - Encryption's password.

These are similar to what you'd pass to gbak.

This stack overflow article might help

http://stackoverflow.com/questions/22865260/backup-an-encrypted-database-with-gbak

also

http://docwiki.embarcadero.com/InterBase/XE7/en/Encrypting_Backup_Files
http://docwiki.embarcadero.com/InterBase/XE7/en/Additional_Guidelines_for_Encrypting_and_Decrypting_Database_Backup_Files

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)


thanks

EncryptName is a database's property, our goal is to use TIBBackupService to execute backup and in TIBBackupService we don't find where to put this parameter and the key itself

Using gbak as a command line we can user parameters -sep -encrypt but we prefer using TIBBackupService if possible

Yves

What version of IBX? This was added several years ago.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Yves Ganier

Posts: 10
Registered: 7/1/04
Re: TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 15, 2015 1:43 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Jeff Overcash (TeamB) wrote:
Yves Ganier wrote:
Jeff Overcash (TeamB) wrote:
Yves Ganier wrote:
Hi,

We use TIBBackupService to backup databases on our client servers
Now we have a new encrypted database and we would use TIBBackupService with that DB again

We don't find how specify encryption values to the service
There is a TIBConfigService available but no documentation can be found

How we can manage this case

Thanks for your advice

Yves
Been several years since I put it in but it should be these two properties

EncryptName - Encryption name
EncryptPassword - Encryption's password.

These are similar to what you'd pass to gbak.

This stack overflow article might help

http://stackoverflow.com/questions/22865260/backup-an-encrypted-database-with-gbak

also

http://docwiki.embarcadero.com/InterBase/XE7/en/Encrypting_Backup_Files
http://docwiki.embarcadero.com/InterBase/XE7/en/Additional_Guidelines_for_Encrypting_and_Decrypting_Database_Backup_Files

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)


thanks

EncryptName is a database's property, our goal is to use TIBBackupService to execute backup and in TIBBackupService we don't find where to put this parameter and the key itself

Using gbak as a command line we can user parameters -sep -encrypt but we prefer using TIBBackupService if possible

Yves

What version of IBX? This was added several years ago.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)

Version 17,17 with Delphi XE3
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 15, 2015 9:53 AM   in response to: Yves Ganier in response to: Yves Ganier
Yves Ganier wrote:

Version 17,17 with Delphi XE3

Ok that was before this feature was added to IBX. It looks like it was
introduced in XE5 (Might be XE6, first time it appears in my source is XE5, but
that could be work on XE6).

Untested (typing it directly here so may have typos but should give you a
general sense)) but you might be able to derive your own component and add this
functionality.

uses
IBServices, IBHeader;

type

TMyIBBackup = class(TIBBackup)
private
FEncryptName: String;
FEncryptPassword: String;
protected
procedure SetServiceStartOptions; override;
published
property EncryptName : String read FEncryptName write FEncryptName;
property EncryptPassword : String read FEncryptPassword write FEncryptPassword;
end;

implimentation

procedure TMyIBBackupService.SetServiceStartOptions;
begin
iherited;
ServiceStartAddParam(EncryptName, isc_spb_bkp_encrypt_name);
ServiceStartAddParam(EncryptPassword, isc_spb_sys_encrypt_password);
end;

That should work, I am pretty sure the 2 constants are already there in XE3's
IBHeader. Just register that class in a design time package.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)

Yves Ganier

Posts: 10
Registered: 7/1/04
Re: TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2015 8:18 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Jeff Overcash (TeamB) wrote:
Yves Ganier wrote:

Version 17,17 with Delphi XE3

Ok that was before this feature was added to IBX. It looks like it was
introduced in XE5 (Might be XE6, first time it appears in my source is XE5, but
that could be work on XE6).

Untested (typing it directly here so may have typos but should give you a
general sense)) but you might be able to derive your own component and add this
functionality.

uses
IBServices, IBHeader;

type

TMyIBBackup = class(TIBBackup)
private
FEncryptName: String;
FEncryptPassword: String;
protected
procedure SetServiceStartOptions; override;
published
property EncryptName : String read FEncryptName write FEncryptName;
property EncryptPassword : String read FEncryptPassword write FEncryptPassword;
end;

implimentation

procedure TMyIBBackupService.SetServiceStartOptions;
begin
iherited;
ServiceStartAddParam(EncryptName, isc_spb_bkp_encrypt_name);
ServiceStartAddParam(EncryptPassword, isc_spb_sys_encrypt_password);
end;

That should work, I am pretty sure the 2 constants are already there in XE3's
IBHeader. Just register that class in a design time package.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)


I don't find this constants in IBX files
We plan to update Delphi soon, which will solve this case

Thanks
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: TIBBackupService iwth encrypted database  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2015 9:14 AM   in response to: Yves Ganier in response to: Yves Ganier
Yves Ganier wrote:
Jeff Overcash (TeamB) wrote:
Yves Ganier wrote:
Version 17,17 with Delphi XE3
Ok that was before this feature was added to IBX. It looks like it was
introduced in XE5 (Might be XE6, first time it appears in my source is XE5, but
that could be work on XE6).

Untested (typing it directly here so may have typos but should give you a
general sense)) but you might be able to derive your own component and add this
functionality.

uses
IBServices, IBHeader;

type

TMyIBBackup = class(TIBBackup)
private
FEncryptName: String;
FEncryptPassword: String;
protected
procedure SetServiceStartOptions; override;
published
property EncryptName : String read FEncryptName write FEncryptName;
property EncryptPassword : String read FEncryptPassword write FEncryptPassword;
end;

implimentation

procedure TMyIBBackupService.SetServiceStartOptions;
begin
iherited;
ServiceStartAddParam(EncryptName, isc_spb_bkp_encrypt_name);
ServiceStartAddParam(EncryptPassword, isc_spb_sys_encrypt_password);
end;

That should work, I am pretty sure the 2 constants are already there in XE3's
IBHeader. Just register that class in a design time package.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)


I don't find this constants in IBX files
We plan to update Delphi soon, which will solve this case

Thanks

they should be

isc_dpb_password_enc = 30;
isc_dpb_sys_encrypt_password = 85;

isc_spb_password_enc = isc_dpb_password_enc;
isc_spb_sys_encrypt_password = isc_dpb_sys_encrypt_password;

That stuff must have been added in XE4 (I start work on XE4 using my XE3 which
would explain why it is there in my working copy of XE3)

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02