GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Backup Directory Opus Settings Automatically On A Schedule

I wanted to be able to backup the settings of Opus on a daily schedule, because I make a lot of changes to the configuration, so I want to always have a valid backup file on hand. I am aware that there are other backup methods and options that could be used, however I wanted a way to backup to one, easy to restore, .ocb file. I find the .ocb file the easiest, quickest way to restore Opus to my custom configuration after a new OS install. This is the method I came up with. It may not be the best solution for you, however, I provide this guide as an option for you to use. Here is what I did. First, I made a batch file that would run an Opus command.

"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Prefs BACKUP=all TO "[Insert the path to the folder where you want your backups saved to]/Ob - Opus Config - {date|MM-dd-YYYY}" Quiet 

Copy and save the above code as a .bat file. Open that file in your text editor. Make note that the section that reads [Insert the path to the folder where you want your backups saved to] needs to be changed to suit your purposes. It needs the full path to your save folder. Also you can rename the Ob - Opus Config to whatever you want your backup file to be named as. Then at the end, I have the date appended to the end of the backup file. The Quiet part simply means it will run without a cmd window showing on your monitor.

So, after you have made the changes that will suit you, you can run it and test it out. Once you are satisfied that it works well, then on to the next step.

After I tested the script, I used a program called Bat to Exe Converter. Freeware, and easily found via Google. This is not an absolute must, but it's something I prefer to do. Skip it if you don't want to make it happen. Anyway, I converted my .bat file to a .exe file, then stored that .exe file somewhere that I knew it would be safe.

Next open your Task Scheduler. For ease of access. you can simply press the Windows key plus the R key, and in the text box that pops up, enter taskschd.msc .

Once that is open, Create a new basic task, and the program will pretty much walk you through all the steps you need to do in order to create the task. I titled mine as Daily Opus Backup. Then the next step I chose to make it a daily task, then entered the time I want it to run each day, then selected that I wanted to run a program (which is why I converted it to a .exe file above) , and then pointed it to where I had stored the .exe file.

That's pretty much it. Works great, and I don't have to remember to make backups for Opus. Of course you can choose to run it once a day, once a week, once a month, just whatever suits your needs.

Hope this will be of help for Opus users in the future.

UPDATE: I found out that if Opus is running, and minimized, then doing as I described above will maximize Opus, and make it the topmost window. If Opus is not running, then DopusRT.exe will start Opus, so that it can complete the command given it.

So, be advised that a better way would probably be as Leo suggests in the below reply to this thread. Using this method, DopusRT.exe will still start Opus if it is not running, however, if it is, then it will remain in it's current state. Example, if it's running and minimized, it will stay that way when the task runs.

1 Like

There's no need to create a .bat file or use a Bat to Exe Converter.

Just tell Task Scheduler to run DOpusRT.exe directly and tell it the arguments, and avoid all of that.

Also note that what you're doing will cause Opus to launch to run the backup if it isn't running at the time the scheduled task runs. If you have Opus running all the time, that's probably fine, but it might cause problems for people who don't want to do that.

You could also just ensure the config folders are backed up regularly as part of other backups of important data, or schedule a task to copy the config folders, if you want regular automated backups.


Related threads people may find useful:

When I read the Help file regarding DOpusRT.exe is merely states "You can use it to run internal commands from outside of Opus." Help file does not explicitly state that invoking it will cause Opus to launch, so I was unaware of that fact. Good to know. Thanks!

Also please note that the first thread you used as reference above regarding Settings Auto Backup does not work. That visual basic script was automatically disabled in my version of Opus 12, and would not be enable. I made a post regarding that in the Help section earlier. Of course, others mileage may vary.

The auto backup just ran for the first time via Task Scheduler on my system, and something happened that I would like to avoid, if possible. I had Opus minimized, and when the task ran, it caused Opus to be maximized and the topmost window.

Is there a way in the backup command to avoid this, @Leo ? Any way to include the /restart:norun within the /cmd portion? Not a show stopper for me, just a slight annoyance.

DOpusRT sends commands to Opus to make it run them, so if Opus isn't running it has to start it.

That does not happen when I try it, running it directly from Task Scheduler (no .bat file etc.)

I'll give that a try then, running it direct from Task Scheduler, and bypassing the .bat or .exe file.

And also, I stand corrected when I said I did not see in the Help file that DopusRT.exe would start Opus if it wasn't already started. It was in another section of the Help file, entitled "Launching Opus from the Desktop", and states "dopusrt.exe will launch Opus automatically if it's not already running ".

I learn as I go, with your help, and the help of other members.

Indeed, if this task is run direct from the Task Scheduler, then Opus does not maximize and become the topmost window, if it is currently running and minimized. So, that is the way I'm going to use it, and I'll update the OP to reflect this.

You are a great help, to me, and all on this forum!

1 Like