# Duplicate DB name Updating to 2021.10 from 2020.03

**URL:** <https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325>\
**Category:** Support\
**Created:** [February 3, 2022, 5:14pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325 "2022-02-03T17:14:38Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![oooleg](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oooleg](https://forum.eaasi.cloud/u/oooleg)\
**Post date:** [March 15, 2022, 8:27pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/21 "2022-03-15T20:27:40Z")

</div>

> [@kirichacha](#):
>
> I have a backup of the directory structure from October of 2020, that may suffice?

If you have a directory located at `/eaasi/portal` in your backup, then just restore it as-is to your EaaSI installation directory. The installer should then migrate its content correctly.

---

<div class="post-metadata">

**Author:** ![kirichacha](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kirichacha](https://forum.eaasi.cloud/u/kirichacha)\
**Post date:** [March 16, 2022, 4:23am UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/22 "2022-03-16T04:23:33Z")

</div>

alright~ I got the keycloak-users file to be generated!  
After copying the ENTIRE backup folder, not just the eaasbackup/portal folder.

and so I logged in using the keycloak thing there. I noticed that the contents are a little strange

```auto
username,email,password
eaasi_group,eaasi@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##
zfurste,zfurste@andrew.cmu.edu,##

```

several users have the same exact name.

When I log in as the eaasi\_group user and the bottom-most “zfurste” user I don’t see any images saved when I go to  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/eaasi/original/1X/e1c4943f3a85cb5c53fc9d67bbbc080200250959.png)  
and when i go to

 ![image](https://us1.discourse-cdn.com/flex019/uploads/eaasi/original/1X/39b564eef33790012ce6c34e8f1aeafcf98a86cb.png)

I think there should be some resources because when I was looking at the backup folder I found these two iso files in the objects folder:

```auto
Binary file eaas-home-backup-Oct152020/objects/Eric_MicrosoftEncarta98/iso/Encarta98_2.iso matches
Binary file eaas-home-backup-Oct152020/objects/Eric_MicrosoftEncarta98/iso/Encarta98_1.iso matches

```

Do I just have to recreate these or should they have been imported when doing the update?

Thanks again for all your help!

---

<div class="post-metadata">

**Author:** ![oooleg](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oooleg](https://forum.eaasi.cloud/u/oooleg)\
**Post date:** [March 16, 2022, 8:32pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/23 "2022-03-16T20:32:53Z")

</div>

Yeah, that list of users looks strange indeed. Could you also send me the corresponding log as described [earlier](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/13)?

---

<div class="post-metadata">

**Author:** ![kirichacha](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kirichacha](https://forum.eaasi.cloud/u/kirichacha)\
**Post date:** [March 17, 2022, 2:00pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/24 "2022-03-17T14:00:18Z")

</div>

That call did not return anything

```auto
$ sudo journalctl -u eaas | grep eaasi-web-api > eaasi-web-api.log
kiritharan@eaasi-prod:~$ 

```

Should it be grepping for eaasi-web-api or something else for the database?

Here are also the two database calls looking at the serialized data and below is the server log.

```auto
$ sudo docker exec -it eaasi-database psql eaasi webapi -c '\dt'
                     List of relations
 Schema | Name | Type | Owner  
--------+----------------------------------+-------+--------
 public | SequelizeMeta | table | webapi
 public | application_log | table | webapi
 public | bookmark | table | webapi
 public | eaasi_role | table | webapi
 public | eaasi_task | table | webapi
 public | emulation_project | table | webapi
 public | emulation_project_resource | table | webapi
 public | emulation_project_task_successor | table | webapi
 public | user_imported_content | table | webapi
 public | user_imported_environment | table | webapi
 public | user_imported_image | table | webapi
 public | user_imported_software | table | webapi
(12 rows)

$ sudo docker exec -it eaasi-database psql eaasi webapi -c 'TABLE "SequelizeMeta"'
                           name                            
-----------------------------------------------------------
 000-create-eaasiRole.js
 000-create-eaasiTask.js
 000-create-eventType.js
 000-create-language.js
 000-create-machineInterface.js
 000-create-mimeType.js
 000-create-operationType.js
 000-create-unitOfInformation.js
 000-create_country.js
 000-create_mediaType.js
 000-create_mimeType.js
 001-create-audioDevice.js
 001-create-eaasiUser.js
 002-create-colorDepth.js
 002-create-eaasiUserHash.js
 002-create-imported-software-resource.js
 003-create-bookmark.js
 003-create-chipset.js
 003-create-configNetwork.js
 003-create-frequencyUnit.js
 004-create-cpuArchitecture.js
 004-create-emulator.js
 005-create-contentObject.js
 006-create-displayDevice.js
 007-create-displayInterface.js
 007-create-displayRes.js
 008-create-fileExtension.js
 009-create-fileFormat.js
 010-create-fileSystem.js
 011-create-developer.js
 012-create-file.js
 012-create-fmtOperation.js
 013-create-gpuDevice.js
 014-create-kbLayout.js
 015-create-machineType.js
 017-create-networkDevice.js
 018-create-networkService.js
 019-create-objFileOp.js
 019-create-systemRequirements.js
 020-create-osVersion.js
 021-create-pointerDevType.js
 022-create-programLang.js
 023-create-readWriteStatus.js
 024-create-region.js
 025-create-softwareLicense.js
 026-create-softwareObject.js
 027-create-softwareProduct.js
 028-create-softwareType.js
 029-create-storageDeviceType.js
 030-create-timezone.js
 031-create-timezoneLabel.js
 032-create-userInformation.js
 034-create-softwareVersion.js
 035-create-configuredOS.js
 036-create-configSoftware.js
 036-create-processorDevice.js
 037-create-configMachine.js
 038-create_audioDevDrivSoft.js
 039-create-pointerDevice.js
 041-create-softwareEnv.js
 042-create-audioDevHasEquiv.js
 043-create-audioDevMachInterface.js
 044-create-computingEnv.js
 045-create-configAudioDev.js
 046-create-configGpuDev.js
 049-create-keyboardDevice.js
 050-create-cfgKeyboardDevice.js
 051-create-cfgGpuDevHasDispDev.js
 053-create-cfgNetworkEmulatesNetworkSvc.js
 054-create-cfgNetworkHasCfgMach.js
 056-create-cfgNetworkDevice.js
 057-create-cfgNetworkMachExpNwSvc.js
 059-create-fileExtension.js
 060-create-storageDevice.js
 061-create-fmtImplementation.js
 064-create-cfgOsHasUserInfo.js
 065-create-configuredOsLang.js
 066-create-cfgPointerDevice.js
 068-create-cfgSwHasUserInfo.js
 069-create-cfgSwUsesFmtImplementation.js
 070-create-cfgStorageDevice.js
 071-create-contentEnv.js
 072-create-osVersColorDepthSettings.js
 073-create-osVersKeyboardLangSettings.js
 073-create-osVersKeyboardLayoutSettings.js
 074-create-osVersDisplayResSettings.js
 075-create-osVersKbLayoutSettings.js
 075-create-osVersLangSettings.js
 076-create-osVersRegionSettings.js
 077-create-softwareVersLangSettings.js
 080-create-contentObjHasObjFile.js
 081-create-dispDevHasColorDepth.js
 082-create-dispDevHasDispInterface.js
 083-create-dispDevHasDriverSoftware.js
 084-create-dispDevHasDispResolution.js
 087-create-fileFmtHasFileExt.js
 089-create-gpuDevHasDispInterface.js
 090-create-gpuDevHasDriverSoftware.js
 091-create-gpuDevHasMachInterface.js
 092-create-gpuDevHasEquivalent.js
 093-create-KeybDevHasDriverSw.js
 094-create-KeybDevHasLang.js
 095-create-KeybDevHasMachInterface.js
 096-create-networkDevHasDriverSw.js
 097-create-networkDevHasMachInterface.js
 100-create-fileOperation.js
 100-create-osVerHasAltID.js
 102-create-osVerHasProgLang.js
 103-create-osVerHasSwLic.js
 104-create-osVerIncSwVer.js
 105-create-osVerIsCompatWCfgMach.js
 106-create-osVerHasTimezSet.js
 107-create-ptrDevHasDriverSw.js
 108-create-ptrDevHasMachInterface.js
 109-create-swEnvHasPartConfgSw.js
 110-create-swEnvHasDiskImage.js
 112-create-swFamVerHasPtSwVer.js
 113-create-swFamHasPtSwProd.js
 114-create-swObjIsManifestOsVer.js
 115-create-swObjHasAltId.js
 117-create-swObjHasObjFile.js
 119-create-swObjIsManifestSwVer.js
 120-create-swProdHasAltName.js
 121-create-swProdHasSwType.js
 122-create-swVerHasAltId.js
 122-create-swVerHasAltName.js
 123-create-swVerHasDev.js
 123-create-swVerHasFileOp.js
 123-create-swVerHasLangSettings.js
 123-create-swVerHasSysReq.js
 125-create-SwVerHasFmtImp.js
 126-create-SwVerHasProgLang.js
 127-create-SwVerHasSwLic.js
 127-create-SwVerIncSwVer.js
 128-create-swVerCompatCpuEnv.js
 129-create-storageDevHasDriverSw.js
 130-create-storageDevHasMachInterface.js
 131-create-sysReqIncAudioDev.js
 132-create-sysReqNetworkDev.js
 133-create-sysReqIncGpuDev.js
 134-create-sysReqProcessor.js
 136-create-sysReqInPtrDevType.js
 137-create-sysReqInSwVer.js
 138-create-sysReqIncStorageDevTyp.js
 139-create-sysReqKeyboardDev.js
 143-create-applicationLog.js
 145-create-fileOperationHasFileExt.js
 146-create-fileOperationNearestFileFmt.js
 148-create-processorDeviceHasDriverSw.js
 148-create-processorDeviceHasMachInter.js
 148-create-recommendationLevel.js
 149-create-configuredDisk.js
 150-create-configuredDiskHasPartition.js
 151-create-machineRecommendation.js
 156-create-fileFormatHasMimeType.js
 004-create-eaasiTask.js
 008-create-applicationLog.js
 20200618161213-create-emulation-project.js
 20200618161225-create-emulation-project-resource.js
 20200618161227-create-emulation-project-task-successor.js
 20211020193035-insert-default-eaasi-roles.js
 20211020201524-delete-legacy-tables.js
 20211020213045-delete-emulators.js
 20211020213740-delete-temp-environments.js
 20211020213910-delete-imported-software-resources.js
 20211021141205-update-eaasi-tasks.js
 20211022152408-rename-tables-for-imported-resources.js
 20211022160402-rename-columns-for-imported-resources.js
 20211022164522-rename-columns-for-bookmarks.js
 20211109170504-create-keycloak-users.js
(170 rows)

```

[servermarch172022.log](https://forum.eaasi.cloud/uploads/short-url/sCOVva7oH3ZpoObukfOaVBo0bc7.log) (552.1 KB)

---

<div class="post-metadata">

**Author:** ![kirichacha](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kirichacha](https://forum.eaasi.cloud/u/kirichacha)\
**Post date:** [March 25, 2022, 3:53pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/25 "2022-03-25T15:53:58Z")

</div>

@oooleg do you need any other documentation from me on this?  
I am not sure where else to look to see that our old images can be accessible.

---

<div class="post-metadata">

**Author:** ![kirichacha](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kirichacha](https://forum.eaasi.cloud/u/kirichacha)\
**Post date:** [March 28, 2022, 2:00pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/26 "2022-03-28T14:00:24Z")

</div>

My apologies, @oooleg  
There was output for that command I just was looking at this again and realized it was being written to a file, not to be printed out… My bad.  
I see a couple of `FetchError: invalid json response ` in the March 16 attempt.

[eaasi-web-api.logmarch28](https://forum.eaasi.cloud/uploads/short-url/nZmfMJV6GAqMqckOLOPzQl0SNyB.logmarch28) (96.8 KB)

---

<div class="post-metadata">

**Author:** ![oooleg](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oooleg](https://forum.eaasi.cloud/u/oooleg)\
**Post date:** [March 28, 2022, 6:58pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/27 "2022-03-28T18:58:03Z")

</div>

Importing users has been successful according to the log, but no ownership information has been found in the database:

```auto
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | Imported 6 legacy user(s)
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | Updating user-ids in table "bookmark"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | Updating user-ids in table "user_imported_content"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | Updating user-ids in table "user_imported_software"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | Updating user-ids in table "user_imported_environment"...
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | --> No records found! Nothing to update.
Mar 16 00:02:54 eaasi-prod docker-compose[1737132]: eaasi-web-api | Table "user_imported_image" not found! Skipping it.

```

I’m not sure, how that can be fixed now. Your backed up database seems to be incomplete or broken. Do you have any other copies?

---

<div class="post-metadata">

**Author:** ![oooleg](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oooleg](https://forum.eaasi.cloud/u/oooleg)\
**Post date:** [March 28, 2022, 7:00pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/28 "2022-03-28T19:00:45Z")

</div>

Another problem appears to be, that the back-end failed to import legacy image-archive, because your server ran out of storage.

---

<div class="post-metadata">

**Author:** ![kirichacha](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kirichacha](https://forum.eaasi.cloud/u/kirichacha)\
**Post date:** [March 30, 2022, 5:02am UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/29 "2022-03-30T05:02:36Z")

</div>

looking at the .sql file for the database dump i can confirm that the user imported environments are missing…

```auto
--
-- Data for Name: user_imported_environment; Type: TABLE DATA; Schema: public; Owner: eaasi_dev
--

COPY public.user_imported_environment (id, "userID", "eaasiID", "createdAt", "updatedAt") FROM stdin;
\.

```

there would normally be lines of data below that copy but there’s nothing.  
I guess the dump is incomplete. I don’t have any other copies. I think we may just have to manually add the images that are within the objects folder [here](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/22)

thanks again for your help i think this issue can be closed unless you have any other suggestions 🙂

---

<div class="post-metadata">

**Author:** ![oooleg](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oooleg](https://forum.eaasi.cloud/u/oooleg)\
**Post date:** [March 30, 2022, 5:06pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/30 "2022-03-30T17:06:02Z")

</div>

Yes, the simplest solution would probably be to add specific ownership records for each resource into the `user_imported_*` tables manually. Just specify resource IDs as `eaasiID` and assign them to user IDs from Keycloak as reported by the migration under:

```nohighlight
Mar 15 14:09:06 eaasi-prod docker-compose[1677783]: eaasi-web-api | Importing legacy users into Keycloak...
Mar 15 14:09:07 eaasi-prod docker-compose[1677783]: eaasi-web-api | --> User created: OLD-USER-ID -> NEW-USER-ID
...

```

The above snippet means, that a legacy user with ID `OLD-USER-ID` has been mapped to a user in Keycloak with ID `NEW-USER-ID`, so your tables should now use these newly allocated IDs as `userID`.

Also, ownership records for different resource kinds should be added to corresponding tables to work properly. Object resources are located at `<eaasi-install-dir>/objects` and records should be added to table `user_imported_content`. Images on the other hand are located at `<eaasi-install-dir>/minio/data/image-archive/images` and records should be added to table `user_imported_image`. Environments are located at `<eaasi-install-dir>/minio/data/image-archive/environments` and records should be added for each private environment to table `user_imported_environment`.

---

<div class="post-metadata">

**Author:** ![ethan.gates](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.eaasi.cloud/ethan.gates/32/15_2.png) [@ethan.gates](https://forum.eaasi.cloud/u/ethan.gates)\
**Post date:** [March 28, 2025, 1:41pm UTC](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325/31 "2025-03-28T13:41:31Z")

</div>



[Previous page](https://forum.eaasi.cloud/t/duplicate-db-name-updating-to-2021-10-from-2020-03/325.md?page=1)
