On 08.08.2014, at 07:50, cpaulson <[email protected]> wrote:
> Repository home directory is crashed/deleted. But the DB system configured
> with repository still holds its data.
>
> After the crash, I run the repository again and repository home directory is
> restored back. But Workspace that i have created is lost not restored back.
Depending on the configuration, there are some vital things stored in the home
and workspace dirs, including node types, namespaces, search indexes (inside
the workspace). If these have changes compared to the out of the box defaults,
they are lost. But maybe you are lucky and most data is in the DB.
But I see you are using the FileDataStore, which by default is under
repository/datastore IIRC, if that is really lost, all your binaries (nt:files)
will be gone...
When there is no home directory, Jackrabbit will create a plain one, that's not
actually "restoring" (since there is no backup to restore from).
For the workspaces, you need to set up a workspace directory plus a
workspace.xml for the specific workspace(s) you had. (The <workspace> part in
repository.xml is only used as template when you call
Repository.createWorkspace() or whatever the name of the API is).
What I would do is:
- make a backup of your DB and everything that's still there (to avoid
overwriting it when trying the steps below)
- add the workspace directory with a workspace.xml based on <workspace> and
replace the placeholders such as ${wsp.name}
- (you might want to create a new workspace to see how it looks like)
- ensure the settings map to your existing DB
- if still available, restore the file data store at repository/datastore
(please check, not sure if that is the default location)
- start Jackrabbit
- the search index should reindex itself from scratch, would block the startup
until it's down IIRC
- figure out if you had any custom node types etc., check the logs on errors
and/or simply test your application
Good luck!
Alex