As server admins, we sometimes get in a bind where we have just done a rollback on the server or a cutover and then a user comes out of the woodwork to request a workflow that got lost in the shuffle. We then face restoring the old backup to a lower environment to grab the workflow. This happened to my team recently and it made me want to take a more frequent backup of all of the workflows (we already back up our MongoDB daily), just in case. That is why this utility ServerRipper was created.
This utility builds on the excellent work of @patrick_digan about the Alteryx API and @jdunkerley79 on dynamic directory creation using the Run Command tool.
End Result
After running the workflow, a hierarchy of folders is created. Within the top-level folder - I have called mine ServerWorkflowBackup - a folder is created for each Studio/Subscription e.g. Finance, Accounting, Admins.
Within each Subscription folder, a folder is created for each User.
Finally, within each user folder is a .yxzp package of every workflow and app that the user owns on the gallery.
Install and Run
Download and open the file ServerRipper_community.yxzp attached. This was developed in Designer 2020.1.
When prompted to import packages, say yes. Ignore errors and warnings on the Import Workflow Package and Workflow Dependencies popups.
Close Designer and go back to your download location. At this location '\ServerRipper_community\yxi installer' find and install 'Alteryx API Runner.yxi'. Reopen the workflow.
Follow the rest of the instructions in the workflow.
If you find that you have errors, ensure that the Cleanse tool is set up correctly, and ensure that you are a Curator in your Gallery.
I hope that you find this simple to use and that it saves you from a headache someday. Enjoy!
I'm definitely going to use this.
Beyond backups I want to search the xml find connections, sql, etc.
Thanks SO much for sharing
@hroderick-thr wrote:Beyond backups I want to search the xml find connections, sql, etc.
Same! Let me know what you discover.
Thank you so much for you work flow , we have it working in our environment now 🙂
One thing though, in the formula tool before the batch file creation , just added a couple quotes to encase the folder path..... we have some exotic active directory names with more than one period eg: value1.value2.lastname
thanks again!
Hi, Thanks for the solution. When i ran the job i see all YXZP files created. May i know how can i download (yxmd/yxmc/yxwz files). Because i want to open all workflows as text(XML) in designer and search for TEXT. (to see how may workflows using one table)
With YXZP i would need to extract each package one by one to read (yxmd/yxmc/yxwz files). Please help.
Thanks.
Hi Shareef
As far as I can see in the API docs you can only download assets as a package .yxzp .... you will need another component to unpack and search for your text in the underlying XML.
Cheers
Adrian
I have got 300+ packages now. any ripper to unzip all of them in a sigle go. Please help.
TIA - Sha
If anyone is still looking at this - workflow packages (yxzp files) are actually just zip files, so if you output them from the api with a file extension of zip, then you can open them like a normal archive file with an input tool and then grab the actual workflow file within.
It has served me well. I built an app that people run to get a workflow into production. The ripper downloads it from a collection, does an xml inspection and xml changes. Returns an email to requestor with inspection report and a code they provide to a second app if they want to proceed to production. It does a lot of stuff specific to our operations, but being able to manage the transition from dev to prod will be common to most of us.
Cool!