#Decrypting acrastructs encrypted without zones
You need pass as args:
select sql query for fetching data from db -select "select data from data_table;"
insert sql query with placeholder $1 in which place will be inserted data or
binded for inserting directly to db (if you will use -execute param) -insert 'insert into test_insert(data) values($1);
client id for finding key -client_id=onekey
connection string that will be used to connect to db -connection_string="dbname=some_database user=postgres password=postgres host=127.0.0.1 port=5432 sslmode=disable"
Script will search key in .acrakeys folder with name <client_id>, generate sql
insert queries to file decrypted.sql. If you use -execute arg, script will
insert data to db too. If you need just insert to db without generating output file, pass empty filename like -output=""
./acra_rollback -select "select data from data_table;" -insert 'insert into test_insert(data) values($1);' -connection_string="dbname=some_database user=postgres password=postgres host=127.0.0.1 port=5432 sslmode=disable" -client_id=onekey
#Decrypting acrastructs encrypted with zones
The same but:
use -zonemode param
you don't need pass client id
your SELECT sql query must fetch zone and data from db and zone should be first -select "select zone, data from data_table;"
all zone private keys should be placed in keys dir (.acrakeys default)
./acra_rollback -select "select zone, data from data_table;" -insert 'insert into test_insert(data) values($1);' -connection_string="dbname=some_database user=postgres password=postgres host=127.0.0.1 port=5432 sslmode=disable" -zonemode
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.