Here are the steps I followed
- went to disk utilities -> file -> new image -> image from folder
- selected iCloud Drive and pressed in choose
- named it as iCloud Drive.dmg with encryption 256-bit AES and image format as read-write
- The location to save was set to iCloud Drive itself.
- clicked on save and the operation was successful after which I clicked on done.
After this, I went to iCloud to check for dmg file, but there was no disk image created.
I tried to do the same thing again with the exact same procedure of creating disk image with name iCloud Drive.dmg in iCloud with AED-256 bit and read-write permission. When I clicked on save, it was shown that a file names iCloud Drive.dmg already exists in this folder called "mobile documents".
I tried creating the same file again in the same location, but with a different name called "iCloud Driv.dmg" instead of "iCloud Drive.dmg". It was created successfully, but didn't appear in iCloud. Must have been created in the mobile documents folder as shown in the screenshot above.
I didn't know what mobile documents was, so after researching quite a bit, I got to know it was in the libraries folder which could be accessed from the finders Go -> Libraries and there was a mobile documents folder in there.
But after opening the mobile documents folder, it redirected me back to the iCloud folder itself which doesn't have the disk image file I created as I have mentioned above.
So where exactly has this iCloud Drive.dmg and iCloud Drive.dmg folder been saved ? In the screenshot I have posted, it says the file is saved in mobile documents, but mobile documents just redirects me to the iCloud folder.
Additional info : My M2 pro runs on Ventura.
I also tried this command I got from a YouTube video that claimed would display all the contents in "mobile documents" folder. The command was "defaults write com.apple.finder AppleShowAllFiles YES". The command ran in command terminal, but when I went to the mobile documents folder to check, there was no difference and it just redirected me back to the iCloud folder...