Page 1 of 1
Scheduled Flow Backup
Posted: Wed Mar 30, 2022 9:38 pm
by magnussandstrom
In these times of increasing cyber attacks..
Is it possible to schedule backup of all my Switch Flows, lets say like 'Once a week''?
Re: Scheduled Flow Backup
Posted: Thu Mar 31, 2022 9:25 am
by mkayyyy
Either this app
auto-save-plus or these flows
github.com/open-automation/switch-flow-auto-backup can handle backing up flows. We use the latter with some custom scripts added to back up to AWS S3 every week
Re: Scheduled Flow Backup
Posted: Thu Mar 31, 2022 9:34 am
by jan_suhr
You can do a normal backup of the folder they are stored in on disk:
C:\Users\theUserName\AppData\Roaming\Enfocus\Switch Server\flows
Just a bunch of XML-files.
Re: Scheduled Flow Backup
Posted: Thu Mar 31, 2022 9:41 am
by patej
We also use a modified version of that switch-flow-auto-backup flows, but unfortunately the result is not the same that you get when exporting flows manually. The problem is in the way that Switch logic has changed in using property sets e.g. for PitStop Server actions etc. but it's better than nothing and we haven't had the time to fully reverse-engineer what exporting does... I have requested (years ago..) an additional method for exporting flows to be added to Switch scripting, but I don't know if it's anywhere in the roadmap.
Of course, another good thing to have is an automated backup of the flows folder and/or whole data root folder so that you can restore the whole system if needed. By the way, the Data Root Backup program (on Windows) has never worked for us, it never finishes before crashing so we have to use other utilities for copying/backup.
Re: Scheduled Flow Backup
Posted: Thu Mar 31, 2022 9:46 am
by mkayyyy
patej wrote: ↑Thu Mar 31, 2022 9:41 am
We also use a modified version of that switch-flow-auto-backup flows, but unfortunately the result is not the same that you get when exporting flows manually. The problem is in the way that Switch logic has changed in using property sets e.g. for PitStop Server actions etc. but it's better than nothing and we haven't had the time to fully reverse-engineer what exporting does... I have requested (years ago..) an additional method for exporting flows to be added to Switch scripting, but I don't know if it's anywhere in the roadmap.
Of course, another good thing to have is an automated backup of the flows folder and/or whole data root folder so that you can restore the whole system if needed. By the way, the Data Root Backup program (on Windows) has never worked for us, it never finishes before crashing so we have to use other utilities for copying/backup.
I ended up spending a lot of time a few years ago writing scripts for our version of switch-flow-auto-backup to create all the property sets folders and inject the required files for each flow into them.
Since doing that we've been able to replicate what happens when you export flows manually
Re: Scheduled Flow Backup
Posted: Thu Mar 31, 2022 9:50 am
by patej
mkayyyy wrote: ↑Thu Mar 31, 2022 9:46 am
I ended up spending a lot of time a few years ago writing scripts for our version of switch-flow-auto-backup to create all the property sets folders and inject the required files for each flow into them.
Since doing that we've been able to replicate what happens when you export flows manually
Interesting! We started doing that, but other things got prioritised over that... Any chance you could share those scripts so that we could adapt those into ours?
Re: Scheduled Flow Backup
Posted: Thu Mar 31, 2022 8:36 pm
by magnussandstrom
Thanks for the input! Now I have some options to consider.