You can export a workflow from database by means of cmd4.
To export a workflow
Use the command: cmd4 config -out
For the example, the command:
cmd4 config -out wf_uploadimg.xml -name wf_uploadimg -username xxxx -password yyyy
where xxxx is the name of a GN4 user who can logon to system with sufficient permissions to perform this operation and yyyy is the password.
Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples.
exports the workflow wf_uploadimg creates a workflow file in the same folder where cmd4 resides. The file name is wf_uploadimg.xml
See also
Remove a workflow from database