From: Michael W. <wes...@ja...> - 2025-07-25 00:36:20
|
Hi Tony, Okay, the "Failed to open database" message concerns me. under /usr/local/src/exist3-data do you have the following files? -rw-rw-r--. 1 exist exist 1451 Jul 25 08:57 00000000d6.log -rw-rw-r--. 1 exist exist 13991936 Jul 24 22:40 collections.dbx -rw-r--r--. 1 exist exist 1515 Jul 24 22:38 counters -rw-rw-r--. 1 exist exist 16 Jul 25 08:57 dbx_dir.lck -rw-rw-r--. 1 exist exist 6785642496 Jul 24 22:38 dom.dbx drwxrwxr-x. 15 exist exist 4096 Sep 27 2020 expathrepo drwxrwxr-x. 3 exist exist 132 May 20 12:14 export drwxrwxr-x. 3 exist exist 16 Apr 3 2018 fs drwxrwxr-x. 2 exist exist 6 Jul 21 20:47 fs.journal -rw-rw-r--. 1 exist exist 140 Apr 16 2018 jmxservlet.token -rw-rw-r--. 1 exist exist 16 Jul 25 08:57 journal.lck drwxrwxr-x. 2 exist exist 103 Jul 23 2022 lucene -rw-rw-r--. 1 exist exist 4636672 May 22 21:46 ngram.dbx drwxrwxr-x. 2 exist exist 8192 Jul 25 08:44 range -rw-rw-r--. 1 exist exist 120 Apr 9 2018 README -rw-rw-r--. 1 exist exist 257 Apr 9 2018 RECOVERY -rw-------. 1 exist exist 11 Mar 8 10:20 restxq.registry drwxrwxr-x. 2 exist exist 42 Jul 23 2022 sanity -rw-rw-r--. 1 exist exist 8192 Jul 23 2022 sort.dbx -rw-rw-r--. 1 exist exist 6046371840 Jul 24 22:40 structure.dbx -rw-rw-r--. 1 exist exist 63342 Jul 21 20:35 symbols.dbx -rw-rw-r--. 1 exist exist 46583808 Jul 24 22:40 values.dbx The dom.dbx file should be very large. That's where all of your data is at. If this file is broken, then the data isn't recoverable. The RECOVERY file states: RECOVERY ======== If the index got corrupted, this is how to recover: - stop database - remove all ".log" transaction log files - remove all ".lck" lock files - remove all ".dbx" files *EXCEPT dom.dbx, collections.dbx and symbols.dbx* - start database I really don't like doing it without a backup. So first, make a tarball of /usr/local/src/exist3-data as a backup of the raw data then start the recovery process above. And once the database is up and running again, run: cd /usr/local/src/exist3 bin/backup.sh --dir ~/tmp/2025-07-25-backup --backup /db And this is my script modified for your setup that I run daily via crontab: #!/bin/sh unset JAVA_OPTS export JAVA_HOME=/usr export EXIST_HOME=/usr/local/src/exist3 export TARGET=/tmp export DATE=`date +"%Y-%m-%d"` export PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin cd $EXIST_HOME bin/backup.sh --backup /db --dir $TARGET/full-$DATE -u "admin" -p "password" I thought it was supposed to get the username and password from the $EXIST_HOME/backup.properties file, but when I tested it by hand just now without the -u/-p parameters it failed. Not sure why. Anyway, daily backups going forward would be a very good idea. Take care. 2025年7月24日(木) 23:21 Tony Graham <tg...@an...>: > Michael, > > Thanks for following through with this. > > On 23/07/2025 09:00, Michael Westbay wrote: > > Okay. Let's first find EXIST_HOME by finding where the conf.xml file is. > > > > find /usr/local -name conf.xml > > It found multiple, but the ones of interest are: > > /usr/local/src/exist3/installer/conf.xml > /usr/local/src/exist3/conf.xml > > > If /usr/local is EXIST_HOME, then run.sh will be in /usr/local/bin along > > with all of the other eXist executables. > > The only things in '/usr/local/bin' are 'tracd' and 'trac-admin' for use > with Trac. (Still the best issue tracking/wiki system.) > > > This conf.xml file will then specify where the data directory is: > > '/usr/local/src/exist3/conf.xml' has: > > <db-connection cacheSize="256M" checkMaxCacheSize="true" > collectionCache="64M" database="native" > files="/usr/local/src/exist3-data" pageSize="4096" > nodesBuffer="1000" cacheShrinkThreshold="10000" > doc-ids="default" minDiskSpace="128M"> > > > You could also search for run.sh the same way: > > > > find /usr/local -name run.sh > > As before, I don't have a 'run.sh' (unless you count 'run.sh' for > Antenna House Formatter). > > Running the Java installer as a non-root user has never given me a > 'run.sh'. > > I downloaded the 'run.sh' [1] for that eXist-db version from GitHub, > edited it to use the same Java alternative as used for the database, ran > it, and got: > > ---- > cd "/usr/local/src/exist3/" ; ./bin/run.sh org.exist.backup.ExportMain > -x -d /mnt/tmp > ERROR: Failed to open database: > org.exist.storage.BrokerPoolServiceException: org.exist.EXistException: > java.io.IOException: Collection /db/system/security/exist/accounts > cannot be created. > ---- > > If this can be solved, the problem then becomes that we don't know how > many other collections will have similar problems, so I'm not hopeful. > > Regards, > > > Tony Graham. > -- > Senior Architect > XML Division > Antenna House, Inc. > ---- > Skerries, Ireland > tg...@an... > > [1] > > https://raw.githubusercontent.com/eXist-db/exist/refs/tags/eXist-3.0.RC2/bin/run.sh > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > -- Michael Westbay Writer/System Administrator http://www.japanesebaseball.com/ |