Rclone and syncing a Mac DMG file

Hi,

I have an encrypted .dmg file (read/write; not Sparse Bundle, as such) on my Mac (macOS Sierra)

I understand that the file is, in effect, a package folder containing items— folders and files. I periodically add to and delete items from the .dmg file.

Question: If I sync this file (by name) how does Rclone sync deal with the (periodically changing) encrypted contents ?

A sub-question: How does rsync, in general, deal with such .dmg files ? Would one need to add the --delete argument so that items removed from the .dmg file on the Source side are then removed from the .dmg file on the Destination side ?

Thanks!

Howard

Hi,

Well, I should have done some testing before asking the question :slight_smile:

It works. I did the following:

  1. I created a .dmg file in the usual way with Disk Utility. I chose encryption and a read/write file.
  2. I put some files and folders within
  3. I transfered the .dmg file with:

rclone sync /Users/howardm/Desktop/TestDMG.dmg googledrivecrypt:/laptopcrypt/testdmg

The testdmg folder was created and the .dmg file inserted.

  1. I then changed (added/deleted) a bunch of files and folders in TestDMG.dmg on my Desktop and synced it again.

  2. I then downloaded (restored) the .dmg file with a copy command:

rclone copy googledrivecrypt:/laptopcrypt/testdmg /Users/howardm/Desktop

Note that I restored the folder testdmg in the command, not the .dmg file itself.

Boom— the .dmg file was downloaded to my Desktop. I checked it and the sync had worked: the new files/folders had been added to the .dmg file, and the deleted files had been properly deleted.

That’s nice to know— even if it’s a form of “double” encryption.

Cheers,

Howard


Another update:

If you have a single .dmg file to sync, it’s probably best to put it in a folder, say, PersonalStuff So, this folder contains this one .dmg file only.

Then, the commands would be, for the .dmg file called PersonalStuff.dmg ( in PersonalStuff in my Home folder, as an example):


For the sync:

rclone sync /Users/howardm/PersonalStuff googledrivecrypt:PersonalStuff


and then for the copy-to-restore to your Desktop:

rclone copy googledrivecrypt:PersonalStuff /Users/howardm/Desktop


In this way, one is working with folders (rather than files) which I think is best.

Howard

1 Like