When attempting to run the configurebackuplocation.bat command, we get the following error:
d:\<datastoreinstallpath>\tools\configurebackuplocation.bat --location \\<uncpathtoshare>\relational --store relational --operation change
You are attempting to change the backup location of the data store. For a relational data store, existing backups will be copied to the new location and it could take a few moments. For a spatiotemporal big data store, the data store service could be restarted. Please do not interrupt the process once it has started.
Do you wish to continue (Yes or No)?Yes
Error encountered: Failed to generate a token for the user.
When we configured the relational datastore, we provided credentials for the ArcGIS Server hosting server (initial admin user). Isn't this command using the same credentials as the configuredatastore tool? describedatastore also shows no Portal URL because we set up the DataStore with the AGS hosting server before we federated it
Windows Server 2012
ArcGIS Server, DataStore 10.7.1
What credentials does this command use or can you pass it different credentials?
Hi Allan - to me, you shouldn't have to be supplying any credentials for that command. If you look in the help,
It shows this:
In the first example, the backup location for a relational data store is set to a directory named fsdata_bu on a machine named myshare.
configurebackuplocation --operation change --store relational --location \\myshare\fsdata_bu You are going to change the backup location of the data store. Existing backups will be copied to the new location and it could take a few moments. Please do not interrupt the process once it has started. Do you want to continue (Yes or No)? Yes
So to me, the account that needs read write to the changed backup location is the domain account running ArcGISServer.exe and ArcGISDataStore.exe services.
The AGS and DS domain accounts do have read/write/modify to the shared backup location. However, these Windows accounts are not in the AGS or Portal user stores (we are not using IWA). We used built-in ArcGIS Server accounts to set up the DataStore server. I would assume that these same credentials would be used to change the configuration of the datastore. We are using the initial AGS admin account that was created with the AGS site.
Also, what is the difference between using configurebackuplocation and changebackuplocation. I've used both tools and get the same "Error encountered: Failed to generate a token for the user." I think the datastore commands are using the credentials that were used to set up the datastore. I can manually get a token through the arcgis/admin site from the DataStore server. Hardly any of the DataStore tools can take a parameter for username/password, so I assume they are getting credentials to request the token from either the database or a configuration file I haven't found yet.
Thanks for the quick response
Yes, same as me you would have defined and used the same AGS primary site admin account and supplied that when running the post install of the datastore. If the describedatastore is not showing the Portal url then you have federation problems as evidenced by the token error, and you'll probably have issues until that's resolved. Are you sure the Datastore is registered with Server correctly? And then are you sure the Server site with datastore is correctly designated by Portal as the Hosting Site? I would start there.
The help says changebackuploation is legacy and to use configure
Thanks for the insights. I am looking to see if there is a way to add the portal url to the relational datastore configuration without having to unfederate and federate. Apparently, we are able to operate this DS with the AGS site in order to use these components as a hosting server because we have been able to host layers and items through the portal. I'm trying to run the webgisdr tool and found that we should have changed our backup location to a shared drive. Is there a way to add the portal url or do we have to reconfigure a new relational datastore using the portal credentials instead of the AGS credentials?
We configured the relational datastore before federation so we used an AGS admin credential. Should we have federated the AGS server first, then configured the datastore using a portal credential second, and then made this the hosting server third?
Hi Allan - there's just no way to backdoor this stuff. You have to have created your server site and then registered your datastore with the site before federation. I am at 10.8.1 on Windows server 2016. Every time I upgrade I follow the steps outlined in the help here:
without fail. It's possible you need to 'Alter relational data store account passwords'
following this guide,
but I don't know. I've never had to do this as I've always just followed the upgrade steps. Sorry I can't be of more help
I was getting the same error with the GIS Server primary site administrator account disabled (PSA). Enabling that account, which was used when registering the data store with the GIS Server allowed successfully execute the command.
Yeah good one @Hector_Melendez I've had that in my pre-upgrade notes / cheat sheet for so long it's just second nature:
Enable all site admin accounts if not already enabled
Enable all content and service directories for Portal
Enable all content and service directories for Server