Settings Auto Backup (Normal and USB)

Settings Auto Backup (Normal)

Settings Auto Backup.osp (1.81 KB)
This script automatically creates backups of DO settings with specified interval in user defined folder.

How to use?

  1. Copy file Settings Auto Backup.osp to Script AddIns folder
  2. Open Preferences -> Toolbars -> Scripts
  3. Select Settings Auto Backup item and press Configure

In the next window you can edit the following parameters:
Action - if the end file exists: delete (to recycle bin), rename (will add modified date) or replace
Amount - number of backup copies to keep (unlimited if 0)
Copy - copy argument(s) (all - backup everything, another values are data,images,localstate,sounds)
Description - assign a description to backup file
FileName - name of backup file (should be specified by user)
FilePath - path where you want to backup (should be specified by user)
Global - copy global configuration files to backup
Interval - minute(s), hour(s), day(s), month(s)
Number - amount of minutes, hours, days, or months between backups
Password - protect backup file with password (useful for public and/or remote backups)
Remove - list of files and/or folders to remove from backup file (no quotes needed, wildcards supported)

[broken imgur link]

Added in v0.3
Events when the script will be executed. Possible values: True (enable event) or False (disable event).
OnStartup
OnOpenLister
OnOpenTab
OnDisplayModeChange
OnListerUIChange
OnStyleSelected
OnCloseLister
OnCloseTab
OnShutdown
OnTimer

Path now is empty by default. If no path is specified, the script will not be executed.
Fixed error when copying globalprefs.oxc, if the file does not exist (thanks to qiuqiu)

Added in v0.4
Now you can use folder aliases as FilePath value. Example: /myarchive\Programs\Directory Opus. I do not know why, but aliases in format {alias|} do not work.
AddDate - this option allows you to add the current date to the file name. If FileName is not specified, the file name will be the current date, even if AddDate = False.

Added in v0.7
Action - this option allows you to set action that will automatically delete, rename or replace existing backup file.
Now you can use extreme backup configuration: rename + 1 minute(s) :slight_smile: This can be useful if you are frequently making changes to the DO, for example, when testing a button.
All fixed values now can be selected from drop-down lists.
AddDate was discarded.

Added in v0.8
OnTimer - every minute checks for the existence of the file and executes the script, if necessary.
Notes:

  • This option has the highest priority in the script, so when you turn it on all other events will be ignored.
  • When enabling or disabling this option, you should restart DO. Also if you change any settings of the script, you should restart the program for the changes to take effect.
  • If this option is disabled, then all changes will take effect immediately.

Added in v0.9
Amount - number of backup copies to keep (unlimited if 0)

Added in v1.0
Description - assign a description to backup file
Global - copy global configuration files to backup
Password - protect backup file with password (useful for public and/or remote backups)
Remove - list of files and/or folders to remove from backup file (no quotes needed, wildcards supported)

Example:

Collections\Duplicate Files.col
Collections\Find Results.col
ConfigFiles\smartfav.osf
Icon Cache Roaming
Images
Libraries
Photo Sharing
Script AddIns\CLI
Scripts
Sounds
State Data\browsepaths.osd
State Data\lastrename.osd
State Data\MRU\browse_icon.osd
State Data\MRU\filter_*.osd
State Data\MRU\find_*.osd
State Data\MRU\rename_*.osd
State Data\recent.osd
Toolbar Sets
User Data
UserCommands

Added in v1.1
Copy - copy argument(s) (all - backup everything, another values are data,images,localstate,sounds)
Examples: empty (no value), all (default value), or data,localstate, or images,sounds and etc.


Settings Auto Backup (USB)

Settings Auto Backup (USB).osp (1.83 KB)

Differences with the Normal non-USB version:
Copy - list of files and/or folders to copy to backup file (no quotes needed, wildcards supported)
Description
Global
Password

[broken imgur link]

Added in v0.2
Fixed an error that occurred when FilePath was not found.

FilePath Does not support folder alias?

can not copy globalprefs.oxc

Added in v0.4.

Fixed in v0.3. Thank you.

Great script! Is there a way to set the script to only allow x number of backups to exist? Or automatically delete backups x days old?

sk0tto
Thanks. It's good idea.

Added in v0.9

Script has been updated to v1.0

Fixed an error that occurred when FilePath was not found.

[Attachment moved into the root post.]

I can't fix the top post, to replace the old version of the script to the new (edit button is missing).

Editing is enabled in this part of the forum once you link your account.

I've moved the new download into the root post for you, and added the new version history there as well.

Is there a specific reason the new version is "0.2", while the previous version was "1.1"?

EDIT (response to Leo below): Ah thanks, I see! o)

There are two scripts. The USB and non-USB scripts have different version numbers.

Thank you.

Superb! Installed; utilized; loved!!! :smiley: :smiley: :smiley:

Any chance such a tool could be modified to execute the reverse function? I want to have my PC "push" preferences to a network drive (accomplished -- thank you!), then have my laptop "pull" (restore) the same set. In this way the PC & laptop will operate in a master / replicate relationship in regards to their Directory Opus installs.

Just an idea: what about some new item "OnChanges"? So the backups would be created, only if any changes were made. That would avoid identical backups.

Great script! Request date/time be included as part of filename (or at least as option).

Cheers!

Digging into this, I see the script renames the previous backup with a date-time stamp. Still interested in automatically adding a date-time stamp to the the initial and subsequent backups.

This was working, now stopped. I can't identify what is preventing it from working, hoping you can help.


Here is the clue:

"Also if you change any settings of the script, you should restart the program for the changes to take effect."

I restarted dopus.exe and the script worked as expected.

Mine was making a backup every minute (62-63s), disabling the timer solved it, more info here... Why is OPUS constantly requesting focus? - #7 by Ghost7