Chronosync backup best practices

Does anyone have a best practice for using Chronosync for DevonThink Pro backups?

I plan on using a thumb drive for the daily backups of rather small Devon files (less than 1GB) and then weekly copying the backups to a larger external drive.

Some of the forum articles appear to be years old. I thought it wise to check to see if anything has changed.

Thank you,

Welcome @defarr
I just use Time Machine and portable externals as a primary backup strategy, so I can’t answer that.

I know @korm used Chronosync back in the day, but I’m not sure if that’s still the case.

My initial tests seem to be working fine, but it always helps to ask the experts.

Thank you!

You’re welcome. Cheers! :slight_smile:

hi. what option are you using for package handling - standard or dissect?

there is some discussion on this board as to how dissect option does not work “well”. most of the users, appeared to try and synchronize using chronosync, but I am just trying to create a backup.

so I wonder why dissect should not work, other than for the fact that devonthink is likely open when chronosync backup is happening and that can cause issues, but that can cause issues even when backing up using the standard package handling option.

dissect can be much faster, for situations where say, only two documents have been added to devonthink, and the entire database (one of mine is 15GB+) needs to be copied for that reason (is using standard package handling option).

There is really nothing special/unique using Chronosync for DEVONthink Pro backups comparied to manually copying or other copy/sync programs. Just make the Source Target where DEVONthink puts the backups, and the Destination Target where you want your copies to go (I send to my ~/Backups/DEVON/Think folder on my Synology NAS). Operation should be “backup left to right”. I check “on” synchronize deletions. I schedule it for once a week, but you can do it more or less often.

My question is: Does it need to be?

there seems to be a choice between “dissect” where Chronosync presumably copies files that have changed inside the source devonthink package, vs “standard” where everything inside the the package is copied.

The 17gb backup, vs 5 files changed, is quite a difference, 5-6 minutes vs 30 min. So if I knew how to be safe about the “dissect” option, I can try and take those precautions. So for example, if Devonthink needs to be quit before the Chronosync backup is done, can do that by a pre-backup script.

But if quitting Devonthink is needed, for backup integrity to be maintained, then I presume it will be needed for “dissect” as well as “standard”.

@BLUEFROG do share your comments on backup integrity and how it relates to

  1. the two options (dissect vs standard)
  2. Devonthink left running and possibly causing changes on the drive while the backup is happening (in either mode - dissect or standard)

Thank you.

I do not use for this purpose. only copy the backup zips. i use TimeMachine to back up entire Mac including DEVONthink packages.

I don’t use Chronosync for backups.
I use Time Machine but am transitioning over to Carbon Copy Cloner more and more.

In the case of Chronosync, yes I would suggest DEVONthink isn’t running when the backup runs.

Or just copy the DEVONThink backup zips which can be backed-up/copied when DEVONThink running.

I think Chronosync runs just like the rsync program, also available to Mac users.

True re: the database archive ZIPs.
And yes, I believe it’s rsync, a fork of rsync, or a similar process.

that is a good idea. so do you generate, database archives on a regular basis. manually or using a script?

read about database archive in the help just now, and it says

Creates an optimized ZIP file of the current database in the selected location. This can be useful as a secondary backup strategy.

And that gets me thinking about what the primary backup strategy should be then?

If I should read something else, do please point. Thank you for your comments!

Edit: Did find this thread here, and replied and asked a question. Confused on the correct way to backup all my devonthink data, advice appreciate :) - #32 by mals

Yes, I have a scheduled AppleScript I picked up somewhere. Backups whatever database is open. I tend to have all the important databases open during the work-day. Scheduled via “cron” to run twice a week. See below.

My Primary is TimeMachine (supplemented with Backblaze offsite copy) which backup everything, including DEVONthink database packages and the zip files. Chronsync copies of zip are “icing on the cake”. Ensure that working before messing with secondary backups.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "DEVONthink 3"
	set theDatabases to every database
	show progress indicator "Running Backup" steps (count of theDatabases)
	repeat with thisDatabase in theDatabases
		set this_database to thisDatabase
		step progress indicator (name of this_database as string)
		set this_date to do shell script "date +%Y-%m-%d-%H-%M-%S"
		set this_path to path of this_database
		set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
		set this_name to the last text item of this_path
		set AppleScript's text item delimiters to ""
		if this_name ends with ".dtBase2" then set this_name to (characters 1 thru -9 of this_name) as string
		set this_archive to "~/SynologyMyDrive/MyDrive/backups/Backups DEVONthink/" & this_name & " " & this_date & ".dtBase2.zip"
		
		set AppleScript's text item delimiters to od
		
		with timeout of 1200 seconds
			set thisMsg to "Verified: " & the name of thisDatabase & " with result "
			set thisResultV to verify database this_database
			set thisLog to log message (thisMsg & thisResultV & " errors and/or missing files")
			if thisResultV = 0 then
				set thisMsg to "Optimized: " & the name of thisDatabase & " with result "
				set thisResultO to optimize database this_database
				if not thisResultO then
					set thisLog to log message (thisMsg & " Optimization of database failed.")
				else
					set thisLog to log message (thisMsg & " Optimization of database success.")
				end if
				
				if thisResultO then
					set thisMsg to "Zipped: " & the name of thisDatabase & " with result "
					set thisResultC to (compress database this_database to this_archive)
					if not thisResultC then
						set thisLog to log message (thisMsg & " zipped of database failed.")
					else
						set thisLog to log message (thisMsg & " zipped of database success.")
					end if
				end if
			end if
		end timeout
	end repeat
	
	hide progress indicator
	
	display notification "DT backup finished."
	
end tell

@rmschne thank you for sharing the AppleScript. that looks good. I will set up the apple script to run once a day. and then once a day backup of my documents should meet the backup needs.

may be I should also use time machine, I do have a drive that I can connect directly to the MacBook. however, that means that every time I disconnect the computer from the hub, I need to first unmount the drive.

Yes, without doubt, use TimeMachine. Please.

1 Like

Yes, of course this is the case. But why is it a ”however”, like it would be a reason to reconsider using Time Machine?

Because as of now, I do not have any USB drives connected to my MacBook, and when I need to take the MacBook somewhere, my muscle memory is simply to pull the USB cable out. :slight_smile:

But, I need to start working on my muscle memory is what I hear from you. Will do. Thank you again for the replies!

You’re welcome and yes, it’s s habit that forms pretty quickly! :smiley:

1 Like

https://ejectbar.com

You could assign a keyboard shortcut to make ejecting faster.

1 Like