Chronosync backup best practices

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

I forgot to mention that I used to use my USB SSD drive for bootable backups and therefore did not use spotlight. However, I believe bootable backups are not possible any more with Monterey. May be CCC offers it still, although I could not tell from their website. CCC v6 appears very capable.

@BLUEFROG before I switch to Time Machine on my USB SSD drive, wanted to ask you as to the reasons why you are transitioning to Carbon Copy Cloner?

Thank you!

Though infrequent, over the years I have had some stalled Time Machine backups with no warning it had a problem. It wasn’t common and twice were due to failing Seagate externals (which I gave up on for Western Digital several years ago too).

Also, I tried CCC as an alternative I could potentially suggest to our clientele. Testing with my own system and data is the only way to feel comfortable making that suggestion.

Speed is fantastic with CCC too. I’m impressed and its reputation is well-deserved. :slight_smile:

2 Likes

See here:

Creating legacy bootable backups of macOS Big Sur (and later OSes)

Stephen

1 Like

Ok. So bootable backups not quite possible. Got that.

As the article says, it can be done with CCC but:

We also do not generally recommend that users attempt to make their backups bootable — you can restore all of your documents, compatible applications, and settings from a standard CCC backup without the extra effort involved in establishing and maintaining a bootable device.

I decided, some time ago when still using macOS Big Sur, to abandon bootable backups following that advice. Personally, I have not lost sleep worrying about that.

Stephen

4 Likes

Sounds like you use CCC and use their standard backup as one backup. Am I right?

In that case, does CCC copy the whole Devonthink Database package when it backs up or does CCC only copy files that are changed from inside the package?

Like Time Machine and Arq, CCC only copies the changes. My CCC backups usually take less than 5 minutes.

1 Like