Re: "Collection /db/system/security/exist/accounts cannot be created."

Michael Westbay <[email protected]> Sun, 20 Jul 2025 14:25:08 +0900
Newsgroups gmane.text.xml.exist
Message-ID <CAJ6MVuNbremn+R7++pAAGsv6n2F=5c34bQV-mw33T5ZVp942YQ@mail.gmail.com>
--===============5585417965424966150==
Content-Type: multipart/alternative; boundary="000000000000b03bfa063a55963a"

--000000000000b03bfa063a55963a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Tony,

At this point, I do a full emergency backup and restore.

From the EXIST_HOME directory, run:

bin/run.sh org.exist.backup.ExportMain -x -d path/to/backup/file

The target filename is usually the date and what went wrong, like
"2025-07-20-out-of-space."

After making the backup, mv the EXIST_HOME/webapp/WEB-INF/data directory
elsewhere, then start up eXist.

Next, extract the emergency backup and cd to db and run:

${EXIST_HOME}/bin/backup.sh -r `pwd`/system/security/__contents__.xml -u
admin -P "new_password"

Then run:

${EXIST_HOME}/bin/backup.sh -r `pwd`/__contents__.xml -u admin -p
"new_password"

The first restore will restore the security collection and set the new
password for admin.

The second restore will restore the rest of your database using the new
password for admin.

Finally, I have two scripts that I always run after a restore to restore
the repos that I use and restore permissions to certain collections.


xquery version "3.0";

<fix-repo>{(
  repo:remove("http://exist-db.org/apps/some_app"),
  repo:install-and-deploy("http://exist-db.org/apps/shared", "1.2.3", "
http://exist-db.org/exist/apps/public-repo/some_app"),
  ...
)}</fix-repo>

Hope this helps.

Take care.



2025=E5=B9=B47=E6=9C=8820=E6=97=A5(=E6=97=A5) 11:51 Tony Graham <tgraham@an=
tenna.co.jp>:

> I have an eXist-3 (yes, eXist-3) that won't respond and won't shutdown
> (short of killing the process).  Starting it devolves into multiple
> stack traces with the message in the subject.  Is there any hope for it?
>
> I got here after killing eXist after a server backup filled the
> filesystem and eXist became unresponsive.  (The backup was because a
> Jenkins job running an Ant task had created some ghost collections that
> showed only in the Java client and that the 'admin' user couldn't
> delete, and I was going to tweak then reload the backup.)
>
> Regards,
>
>
> Tony Graham.
> --
> Senior Architect
> XML Division
> Antenna House, Inc.
> ----
> Skerries, Ireland
> [email protected]
>
>
>
> _______________________________________________
> Exist-open mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>


--=20
Michael Westbay
Writer/System Administrator
http://www.japanesebaseball.com/

--000000000000b03bfa063a55963a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Tony,</div><div><br></div><div>At this point, I do=
 a full emergency backup and restore.</div><div><br></div><div>From the EXI=
ST_HOME directory, run:</div><div><br></div><div style=3D"margin-left:40px"=
>bin/run.sh org.exist.backup.ExportMain -x -d path/to/backup/file</div><div=
><br></div><div>The target filename is usually the date and what went wrong=
, like &quot;2025-07-20-out-of-space.&quot;</div><div><br></div><div>After =
making the backup, mv the EXIST_HOME/webapp/WEB-INF/data directory elsewher=
e, then start up eXist.</div><div><br></div><div>Next, extract the emergenc=
y backup and cd to db and run:</div><div><br></div><div style=3D"margin-lef=
t:40px">${EXIST_HOME}/bin/backup.sh -r `pwd`/system/security/__contents__.x=
ml -u admin -P &quot;new_password&quot;</div><div><br></div><div>Then run:<=
/div><div><br></div><div style=3D"margin-left:40px">${EXIST_HOME}/bin/backu=
p.sh -r `pwd`/__contents__.xml -u admin -p &quot;new_password&quot;</div><d=
iv><br></div><div>The first restore will restore the security collection an=
d set the new password for admin.</div><div><br></div><div>The second resto=
re will restore the rest of your database using the new password for admin.=
</div><div><br></div><div>Finally, I have two scripts that I always run aft=
er a restore to restore the repos that I use and restore permissions to cer=
tain collections.</div><div><br></div><div><br></div><div style=3D"margin-l=
eft:40px">xquery version &quot;3.0&quot;;<br><br>&lt;fix-repo&gt;{(<br>=C2=
=A0 repo:remove(&quot;<a href=3D"http://exist-db.org/apps/some_app">http://=
exist-db.org/apps/some_app</a>&quot;),<br>=C2=A0 repo:install-and-deploy(&q=
uot;<a href=3D"http://exist-db.org/apps/shared">http://exist-db.org/apps/sh=
ared</a>&quot;, &quot;1.2.3&quot;, &quot;<a href=3D"http://exist-db.org/exi=
st/apps/public-repo/some_app">http://exist-db.org/exist/apps/public-repo/so=
me_app</a>&quot;),<br>=C2=A0 ...<br>)}&lt;/fix-repo&gt;</div><div><br></div=
><div>Hope this helps.</div><div><br></div><div><div>Take care.</div><div><=
br></div><div><br></div></div></div><br><div class=3D"gmail_quote gmail_quo=
te_container"><div dir=3D"ltr" class=3D"gmail_attr">2025=E5=B9=B47=E6=9C=88=
20=E6=97=A5(=E6=97=A5) 11:51 Tony Graham &lt;<a href=3D"mailto:tgraham@ante=
nna.co.jp">[email protected]</a>&gt;:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">I have an eXist-3 (yes, eXist-3) that won&#39;t r=
espond and won&#39;t shutdown<br>
(short of killing the process).=C2=A0 Starting it devolves into multiple<br=
>
stack traces with the message in the subject.=C2=A0 Is there any hope for i=
t?<br>
<br>
I got here after killing eXist after a server backup filled the<br>
filesystem and eXist became unresponsive.=C2=A0 (The backup was because a<b=
r>
Jenkins job running an Ant task had created some ghost collections that<br>
showed only in the Java client and that the &#39;admin&#39; user couldn&#39=
;t<br>
delete, and I was going to tweak then reload the backup.)<br>
<br>
Regards,<br>
<br>
<br>
Tony Graham.<br>
-- <br>
Senior Architect<br>
XML Division<br>
Antenna House, Inc.<br>
----<br>
Skerries, Ireland<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">tgraham@antenna.=
co.jp</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Exist-open mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Exist=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/exist-open" rel=3D"=
noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/=
exist-open</a><br>
</blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si=
gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mi=
chael Westbay<br>Writer/System Administrator<br><a href=3D"http://www.japan=
esebaseball.com/" target=3D"_blank">http://www.japanesebaseball.com/</a></d=
iv>

--000000000000b03bfa063a55963a--


--===============5585417965424966150==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============5585417965424966150==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open

--===============5585417965424966150==--