Facing error when migrating windmill from our prod instance to staging one
I am trying to migrate production windmill environment to staging windmill environment. I have ran command "wmill sync pull" on prod workspace to pull everything from prod windmill, then switched workspace to staging one and ran "wmill sync push"
but it throws error "Sql error: error returned from database: new row violates row-level security policy for table "folder"
Server failed. Bad Request: Sql error: error returned from database: new row violates row-level security policy for table "folder""
Can someone guide me what's I can do to get through this. I have confirmed on prod windmill everything is stored in the folders, nothing specific to user.
thanks in advance
10 Replies
what version are you on ? Are you using an admin token ?
I am on v1.272.0
No I have authenticated from browser for all the workspaces
Hello there, can someone please give some directions on this problem.
Thanks in advance.
Use an admin token to do the sync. There are ways to not require it but they would require our guidance to be done well at the moment.
Thanks @rubenf but unfortunetly that didn't worked. I started from the scratch, added both (staging and prod) workspace using the token I generated from user > account settings > create token. Here's the sequence of commands I ran
ended up having the same error
am I doing anything wrong here ?
are you an admin in both workspaces ?
Oh, May be not. it shows super_admin: false here.
I ended up deleting these three folders from the windmill directory (looked into it, saw it holds some initial configuration). And it worked like a charm 😅
now you folders have no more permissions
which might be not what you want
Ok so basically I need to be superadmin of the workspace in order to move over everything ?
no, those errors are legit, they're saying you are pushing folders with permissions that wouldn't allow you to be a writer on them anymore but in the absence of that, if you want to not be limited by permissions you need to be an admin on the target workspace
for a production setup and more precise support, you can always inquiry about the EE support
Ok that make sense, I will try changing my access level to admin. Thank you @rubenf