mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
20.08.2015 2ab070444b9ee8a1e306c140064b0506fbd5537f
OPENDJ-1995 Can't restore new backend

Remove use of "-y" option when putting PersistIt database
in append-mode only
1 files modified
6 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java 6 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
@@ -810,7 +810,9 @@
    try
    {
      // FIXME: use full programmatic way of retrieving backup file once available in persistIt
      String filesAsString = db.getManagement().execute("backup -f");
      // When requesting files to backup, append only mode must also be set (-a) otherwise it will be ended
      // by PersistIt and performing backup may corrupt the DB.
      String filesAsString = db.getManagement().execute("backup -a -f");
      String[] allFiles = filesAsString.split("[\r\n]+");
      final List<Path> files = new ArrayList<>();
      for (String file : allFiles)
@@ -866,7 +868,7 @@
    try
    {
      // FIXME: use full programmatic way of switching to this mode once available in persistIt
      db.getManagement().execute("backup -y -a -c");
      db.getManagement().execute("backup -a -c");
    }
    catch (RemoteException e)
    {