Skip to main content

Is there an easy way to download (or backup) whole repositories from FME Server 2015.1 to workbench-files for use in FME Workbench (Desktop)? In older versions of FME Server I could locate the files in the file system on the server, but not any more.

I'm not really interested in backing up the whole server configuration and I not sure how I would use that from FME Desktop.

I have seen the FME Server Repository reader/writer and in the help it seems that it can be used for backup, but I haven't figured out how to do that.

What I would want to do is basically do a "Download from FME Server" in Workbench, but for multiple files or whole repositories.

Any suggestions?

/Tomas

Hi @tomaslindberg,

The best way to do that would be to use the REST API of FME Server. Have a look at it via the Help menu > REST API or

http://docs.safe.com/fme/html/FME_REST/v2/apidoc/index.html#!/repositories and have a look at the repositories > retrieve item end point.

Hope this helps


@itay is right, the REST API is the way to do it. I've attached a prototype workspace that uses v3 API to iterate over all the repositories and that downloads all the contents into subdirectories named after the repository.

Make sure to set the 3 published parameters before running, in particular the FME Server token id.

Requires FME Desktop / Server 2017.0 or newer.

ws-downloader.fmwt

 


Thanks @itay and @david_r

I have FME Desktop/Server 2015.1 so I can't look at your workspace at the moment and the REST API is new to me (not a developer), but I will have a look into it (and maybe get some help from IT).

 


Thanks @itay and @david_r

I have FME Desktop/Server 2015.1 so I can't look at your workspace at the moment and the REST API is new to me (not a developer), but I will have a look into it (and maybe get some help from IT).

 

Hi @tomaslindberg,

 

I have converted the workspace provided by @david_r to a 2015 version and added some functionality.

 

 

downloadws2015.fmw

 

 

Good luck!

 


Thanks @itay and @david_r

I have FME Desktop/Server 2015.1 so I can't look at your workspace at the moment and the REST API is new to me (not a developer), but I will have a look into it (and maybe get some help from IT).

 

Thanks a lot for your effort @ijay!

 

The workspace runs through and correctly produces folders and all the workspace files. However, the files only contain a single row with the folder path

 

"c:\\temp\\ws_downloader\\GDWJKAR"

 

 

 

FME(R) 2015.1.1.0 (20150715 - Build 15515 - WIN64)

 

FME Server 2015.1.2 - Build 15538 - win64

 


looks like the the name of the ws is not generated properly, can you place some loggers in the ws and attach them here?


looks like the the name of the ws is not generated properly, can you place some loggers in the ws and attach them here?

6857-downloadws2015-log.txt

 

 

This is the logger attached to the end of the workflow, hope it helps?

 

Something strange with the source attribut? Just the value of the attribute i written to the file.

 

 

The filenames of the created files are correct

 


Ha! apparently the download doesn't work properly, I have adjusted the ws.

downloadws2015v2.fmw


Ha! apparently the download doesn't work properly, I have adjusted the ws.

downloadws2015v2.fmw

Impressed @itay ! It works, kind of:-)

 

 

When running downloadws2015v2.fmw with a fresh output path, it could not create the folders and files in the output location (see attached log-file).

 

 

If I first ran the first version downloadws2015.fmw , folders and files were created (but with no real content). Running downloadws2015v2.fmw again with the same output path as used with downloadws2015.fmw, workspaces were downloaded into the existing folders (see attached log-file). So running them after one another does the trick!

 

 

I got 16 rejects were 6 of them were workspaces in our production repositories, the other ten were from the Samples and Utilities repositories. When I investigated my 6 rejects some of them were probably due to Swedish characters å,ä,ö, which I replaced and managed to download. The others seemed "corrupt" in some other way (to old versions probably, could not download them in FME Workbench either.

 

 

So all in all you have solved my problem, many thanks!

 

 

I'm sure more users would love this...

 

6866-downloadws2015v2-no-folders-log.txt

 

6866-downloadws2015v2-existing-folders-log.txt).

 

 


Ha! apparently the download doesn't work properly, I have adjusted the ws.

downloadws2015v2.fmw

 

Glad I could (eventually) help

Reply