Version:
All
Issue:
Projects in Domino are never really deleted. When their useful lifetime is over they can be archived. This prevents them from appearing in the Domino UI. At times it may be necessary to un-archive a project that was prematurely archived. At the moment no functionality exists within the Domino UI for the un-archiving of a project. However, it is possible to un-archive a project via the mongo database. The restoration is not always complete, so read the caveats in the notes section below.
Resolution:
The only way to un-archive a project is to manually edit the mongo database and flip the "isArchived:true" key in the project to "isArchived:false". If your administrator is comfortable making a minor mongo database change like this, the process is below.
If your administrator is not comfortable with making this change, the Domino Support team can
assist. This change is well known to us and we consider it a "standard" change. We still treat these changes with care and document a change request internally. This can take us a day or two to get approved and turned around.
Manual editing of the mongo database that backs Domino is never recommended. It is an inherently dangerous task and incorrect changes in the mongo database can make an entire deployment inaccessible.
For DIY admins, the process to unarchive a project
Let me start with the end goal here. Our goal is to find the project in mongo and then flip the archived flag from true to false. There are several relatively easy ways to find things in mongo and if you have a known method, of course use that. For those not as used to working in mongo follow the example below.
To completely identify a project you will need two pieces of information: the owner and the project name. Remember that project names are not necessarily unique so the owner is also needed.
If you are not completely sure of the name of the full project name or owner's userid, you can do wildcard searches with // instead of using "". In the example I'll recover a project named "archived_project", owned by the user "integration-test".
1. Open the Admin UI in Domino. Then click Advanced -> MongoDB. Here you will want to find the _id of the project. In order to find that _id you can use the project owner's Domino userid.
2. Find the owner's _id: remember my example userid for the project owner is "integration-test" so I just wildcard searched for "integration":
rs.secondaryOk()
db.users.find({"loginId.id":/integration/})
The return here should start with something like this:
{ "_id" : ObjectId("632c77b69f8eae654f009576"), "idpId" : "e513df55-57b8-4a53-9cea-3b8488da5d2b", "loginId" : { "id" : "integration-test", "lowercaseId" : "integration-test" }, "firstName" : "integration-test", "lastName" : "integration-test", "fullName" : "integration-test integration-test",
...
...
You need to save the value of _id:
632c77b69f8eae654f009576
3. Now we will find the project belonging to that user by the project name.
rs.secondaryOk()
db.projects.find({"ownerId":ObjectId("632c77b69f8eae654f009576"),"name":"archived-project"})
Note that if you only have a partial project name, use // instead of "" to do a wildcard search.
rs.secondaryOk()
db.projects.find({"ownerId":ObjectId("632c77b69f8eae654f009576"),"name":/archive/})
The return for this will look like this:
{ "_id" : ObjectId("63b85da9f122d94cf3928253"), "ownerId" : ObjectId("632c77b69f8eae654f009576"), "name" : "archived-project", "description" : "This is a sample Domino Project. This project contains examples for using notebooks, publishing models as APIs, and publishing Python/Flask and R/Shiny web applications.", "created" : ISODate("2023-01-06T17:43:05.718Z"), "collaborators" : [ ], "ownerNotificationSettings" : "RunsStartedByUser", "isArchived" : true, "executionQueue" : { "name" : "small-k8s" },
...
...
Note the bolded, "isArchived" flag above is set to true.
Grab the _id for use in the following command to reset that flag:
63b85da9f122d94cf3928253
4. Finally, flip the archived flag:
rs.secondaryOk()
db.projects.update({ _id: ObjectId("63b85da9f122d94cf3928253")},{$set: { "isArchived":false}})
You should see the following output if the change went through successfully:
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
If you do not see this or you get an error, this likely means that the your command simply did not hit the master node of the mongoDB cluster. Only the master node can do writes. This can vary by version of Domino, but just keep retrying until you get the proper "WriteResult". You'll eventually hit the master node.
5. You can confirm that the project is now visible by using the find command to make sure "isArchived" is set to false.
rs.secondaryOk()
db.projects.find({ _id: ObjectId("63b85da9f122d94cf3928253")})
{ "_id" : ObjectId("63b85da9f122d94cf3928253"), "ownerId" : ObjectId("632c77b69f8eae654f009576"), "name" : "archived-project", "description" : "This is a sample Domino Project. This project contains examples for using notebooks, publishing models as APIs, and publishing Python/Flask and R/Shiny web applications.", "created" : ISODate("2023-01-06T17:43:05.718Z"), "collaborators" : [ ], "ownerNotificationSettings" : "RunsStartedByUser", "isArchived" : false, "executionQueue" : { "name" : "small-k8s" },
...
...
Notes:
There are some caveats to be aware of when unarchiving a project this way. Some items that are cleaned up during the archival process cannot currently be recovered automatically:
-
If the project has been imported in other projects, the dependency to the archived project is removed from those projects. You will need to manually re-add these dependencies to the projects where they were removed. There is no way to proactively find these projects. Users will simply get failures in their project executions if they relied on an import from the archived project. See documentation here on the "Import, Export" process: https://docs.dominodatalab.com/en/latest/user_guide/e6ed48/export-and-import-project-content/
-
If the project had environment variables set, these will need to manually recreated. See documentation on project Environment Variables here: https://docs.dominodatalab.com/en/latest/user_guide/b224e9/secure-credential-storage/
-
If there were any Model Exports in the project, these are deactivated when the project is archived and will need to be manually recreated. See documentation here: https://docs.dominodatalab.com/en/latest/user_guide/02ec6d/export-model-image/
Comments
0 comments
Please sign in to leave a comment.