Can't Login to Portal as Admin. How to do point-in-time restore?

1185
9
03-31-2020 12:44 PM
JesseJosserand
New Contributor III

I'm on 10.6.1 of portal. Recently my user, group, and content data got messed up by a script that was attempting to copy data from one environment to another. Now I cannot login to portal through the browser at all. In fact, if I go to the normal URL, the content you'd expect to see flashes by and is then replaced with a sign-on screen. I try the admin login credentials, but it just refreshes back to the sign-on screen.

What I'm asking is this... since I cannot login as admin, is there any other way to do a point in time restore of the portal's postgres data (I know the date when it all worked before the script was run). If so, can I get a simple 1, 2, 3 procedure?

Thanks in advance.

Btw... after that data mess up occurred, even rolling back to previous snapshots (using vCenter/vSphere) does not fix the problem for some reason.

0 Kudos
9 Replies
JonathanQuinn
Esri Notable Contributor

I assume you haven't taken any backups using the WebGIS DR tool?

Create an ArcGIS Enterprise backup—Portal for ArcGIS (10.8) | Documentation for ArcGIS Enterprise

Modifying the database directly is not supported.

JesseJosserand
New Contributor III

I do have backups running (apparently), but no idea if using that particular tool or some other method.

I was thrown in to this like you’d throw someone in a pool and say learn to swim.

I’ll see what I can find out, but I do know there are archive logs being created (this app uses 9.3 postgres I’ve been told).

<https://www.teksynap.com/>

Jesse F. Josserand | Sr. Systems Architect/System Administrator

M: 601-590-0304 | 😧 228-469-2019 | jesse.josserand@teksynap.com<mailto:jesse.josserand@teksynap.com>

www.TekSynap.com<https://www.teksynap.com/> | 1760 Reston Parkway, Suite 515, Reston VA 20190

Assigned to GDIT Project, 294 Thames Avenue, Bay St. Louis, MS 39520

Jesse.Josserand@GDIT.com<mailto:jesse.josserand@gdit.com>

<https://www.linkedin.com/company/teksynap/>

|

<https://www.teksynap.com/teksynap_signatures/Jesse_Josserand/?vcard=1>

0 Kudos
JesseJosserand
New Contributor III

Also, I do not see a psql executable anywhere on my portal server, though postgres files are clearly present. Is there any external way to manage the database without logging as admin to the portal (since I cannot do that either)?

0 Kudos
JonathanQuinn
Esri Notable Contributor

Following up on Ben Turrell‌'s suggestion, there are more issues than just accessing the portal database. The content is stored in the database as well as the content directory. Is your content directory on the same machine as Portal? If so, restoring the VM to a snapshot should restore both the database and content on the file system. What happens if you try to generate a token via the Sharing API, (https://portal.domain.com:7443/arcgis/sharing/rest/generateToken). There's no supported way to directly interact with or manage the internal database.

It'd be good to understand the network traffic to know why you're getting redirected to sign back in. Have you looked at the traffic via Fiddler or your dev tools?

0 Kudos
JesseJosserand
New Contributor III

As I said in response to Ben’s post, while previously I could not login as admin, yesterday I was able to do so, but it was no help. The content is still screwed up. In fact, graphics on the main page are broken and if I click the related links (and most other links on that page) I’m taken to another host and installation (probably the one that the clone attempt was done for and the failure of which started this problem).

<https://www.teksynap.com/>

Jesse F. Josserand | Sr. Systems Architect/System Administrator

M: 601-590-0304 | 😧 228-469-2019 | jesse.josserand@teksynap.com<mailto:jesse.josserand@teksynap.com>

www.TekSynap.com<https://www.teksynap.com/> | 1760 Reston Parkway, Suite 515, Reston VA 20190

Assigned to GDIT Project, 294 Thames Avenue, Bay St. Louis, MS 39520

Jesse.Josserand@GDIT.com<mailto:jesse.josserand@gdit.com>

<https://www.linkedin.com/company/teksynap/>

|

<https://www.teksynap.com/teksynap_signatures/Jesse_Josserand/?vcard=1>

0 Kudos
JonathanQuinn
Esri Notable Contributor

Take a look at the network traffic. There are requests that are failing, so it'd be good to know what those requests are and what the error response is.

I’m taken to another host and installation (probably the one that the clone attempt was done for and the failure of which started this problem).

I assumed that when you mentioned the machine was restored, it was restored from a snapshot and the machine name would remain the same. It sounds like the machine name has changed. Is that correct? Portal doesn't support hostname changes well, so if the hostname is different, restore to the same machine name.

Modifying content shouldn't cause issues with signing into Portaladmin; did the login problem occur after you restored the machine from a snapshot?

0 Kudos
JesseJosserand
New Contributor III

Thanks all for the great responses and suggestions … I really appreciate the community responding so quickly to a newbie like me. However, after extreme research, I’ve discovered that there is no database file system backup to start from IF a point-in-time restore/recovery could be done with archive logs. Not only that, IF I could even attempt a recovery (assuming such a full filesystem backup were available), I need to rollback logs to March 24th, but my logs only go from March 1st to March 4th, then there’s a gap until March 27th (no idea why, either, but irrelevant at this point)… so no restore is possible to the desired date.

Thanks again, nevertheless. I have learned a lot.

FYI, I did discover how to interact with the portal postgresql database, though it is not supported in case anyone would like to know how to do that. It was this that helped me discover my problems above.

<https://www.teksynap.com/>

Jesse F. Josserand | Sr. Systems Architect/System Administrator

M: 601-590-0304 | 😧 228-469-2019 | jesse.josserand@teksynap.com<mailto:jesse.josserand@teksynap.com>

www.TekSynap.com<https://www.teksynap.com/> | 1760 Reston Parkway, Suite 515, Reston VA 20190

Assigned to GDIT Project, 294 Thames Avenue, Bay St. Louis, MS 39520

Jesse.Josserand@GDIT.com<mailto:jesse.josserand@gdit.com>

<https://www.linkedin.com/company/teksynap/>

|

<https://www.teksynap.com/teksynap_signatures/Jesse_Josserand/?vcard=1>

0 Kudos
BenTurrell
Occasional Contributor III

Hey Jesse Josserand‌,

That is some strange behaviour you are seeing! Are you able to access the Portal Admin rest page and login? The url is normally https://domainhere.com/webadapotrnamehere/portaladmin

It would also be worth looking at the logs to see if there is anything being reported in there.

Thanks,

Ben


If this answer was helpful please mark it as helpful. If this answer solved your question please mark it as the answer to help others who have the same question.

JesseJosserand
New Contributor III

Yesterday, for an unknown reason, I was able to login as portal admin; however, after looking at each and every menu option, I see nothing about backups nor restores for the database.

<https://www.teksynap.com/>

Jesse F. Josserand | Sr. Systems Architect/System Administrator

M: 601-590-0304 | 😧 228-469-2019 | jesse.josserand@teksynap.com<mailto:jesse.josserand@teksynap.com>

www.TekSynap.com<https://www.teksynap.com/> | 1760 Reston Parkway, Suite 515, Reston VA 20190

Assigned to GDIT Project, 294 Thames Avenue, Bay St. Louis, MS 39520

Jesse.Josserand@GDIT.com<mailto:jesse.josserand@gdit.com>

<https://www.linkedin.com/company/teksynap/>

|

<https://www.teksynap.com/teksynap_signatures/Jesse_Josserand/?vcard=1>

0 Kudos