Hi,

I was able to solve this issue, the reason the restore did not run is because 
the old snapshot file was added to the aai-resources docker under user root, 
while the snapshot file should be under user aaiadmin, so that the java restore 
function can read the old snapshot file.

I think the java function should have caught this exception in order to print 
out error if it can’t read the old snapshot file.

 } else if (command.equals("RELOAD_DATA")) {
   … output truncated …
   System.out.println("We will load data IN from the file = " + 
oldSnapshotFullFname);
  System.out.println(" Begin reloading data. ");
<https://gerrit.onap.org/r/gitweb?p=aai/resources.git;a=blob;f=aai-resources/src/main/java/org/onap/aai/dbgen/DataSnapshot.java;h=d7271c97dde2bb360ac3929badeed79cdeb2ecc0;hb=refs/heads/2.0.0-ONAP#l234>
  graph.io(IoCore.graphson()).readGraph(oldSnapshotFullFname);          <<<<<< 
in case the function cannot read the old snapshot file, there’s no error logged 
to user
<https://gerrit.onap.org/r/gitweb?p=aai/resources.git;a=blob;f=aai-resources/src/main/java/org/onap/aai/dbgen/DataSnapshot.java;h=d7271c97dde2bb360ac3929badeed79cdeb2ecc0;hb=refs/heads/2.0.0-ONAP#l235>
  System.out.println("Completed the inputGraph command, now try to commit()... 
");
<https://gerrit.onap.org/r/gitweb?p=aai/resources.git;a=blob;f=aai-resources/src/main/java/org/onap/aai/dbgen/DataSnapshot.java;h=d7271c97dde2bb360ac3929badeed79cdeb2ecc0;hb=refs/heads/2.0.0-ONAP#l236>
  graph.tx().commit();
<https://gerrit.onap.org/r/gitweb?p=aai/resources.git;a=blob;f=aai-resources/src/main/java/org/onap/aai/dbgen/DataSnapshot.java;h=d7271c97dde2bb360ac3929badeed79cdeb2ecc0;hb=refs/heads/2.0.0-ONAP#l237>
  System.out.println("Completed reloading data.");


Abdelmuhaimen Seaudi
Orange Labs Egypt
Email: [email protected]<mailto:[email protected]>
Mobile: +2012 84644 733

From: SEAUDI Abdelmuhaimen OBS/CSO
Sent: Wednesday, August 22, 2018 10:42 AM
To: [email protected]
Cc: SEAUDI Abdelmuhaimen OBS/CSO
Subject: AAI dataRestoreSnapshot

Hi

If I try to restore an old snapshot in AAI Beijing, I find that the 
dataRestoreSnapshot script does not actually reset or clear out the old 
database, before restoring the old snapshot.

This is giving me duplicate records in AAI Graph database, and it prevents me 
from using AAI, as i get errors like, cannot operate on multiple vertices.

For example, customer Demonstration is now appearing several times, and if i 
try to delete this customer, i get error, cannot delete multiple vertices.

I noticed that the scripts calls java function with $1 and $2.  $1 is the old 
snapshot, what is $2 ?

I looked in the code and found out that if we use only $1, the clear entire db 
part runs, however the old snapshot is not imported correctly, and if i try to 
get any values, i get not found error.

What is the correct way to restore an ols snapshot ?

Thanks

A. Seaudi

Sent from Samsung Mobile.

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12238): https://lists.onap.org/g/onap-discuss/message/12238
Mute This Topic: https://lists.onap.org/mt/24918171/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to