Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Whigu

macrumors member
Original poster
Jan 12, 2022
54
40
I'm trying to sync my local Documents from my laptop to my iCloud documents folder but I can't get it work perfectly. It syncs files one way but it doesn't delete them on destination when I delete files on source and this is rsync what I'm trying to use:

rsync -ahP /Users/USERNAME/Documents /Users/USERNAME/Library/Mobile\ Documents/com~apple~CloudDocs/ 2> ~/Desktop/rsyncErrors.txt

I'm trying to do this because as far as I know if I have moved my Desktop and Documents to iCloud they will not be backkedup with time machine at all?

Or is there better way to do this or better rsync sript?
 
Please read this:


Folders synced with iCloud can be backed up with Time Machine, but there are some considerations to keep in mind:

1. **Local Copies**: If the files in your iCloud Drive are stored locally on your Mac (i.e., they are downloaded and not just placeholders), Time Machine will back them up as part of its regular backup process. This means that if you have "Optimize Mac Storage" turned off, your iCloud files should be included in the Time Machine backup .

2. **Optimize Mac Storage**: If you have "Optimize Mac Storage" enabled, some files in your iCloud Drive might only exist as placeholders on your Mac, with the actual files stored in the cloud. In this case, Time Machine will not back up the full content of these files unless they are downloaded locally .

3. **Exclusions**: You can manually exclude certain folders or files from being backed up by Time Machine, including those in iCloud Drive. If you have done this, those items will not be included in the backup .

4. **Restoration**: When restoring from a Time Machine backup, you can recover files from your iCloud Drive as long as they were included in the backup. However, it's important to note that Time Machine is not designed to back up to iCloud itself; it requires an external drive or another local storage solution .

In summary, iCloud folders can be backed up with Time Machine, but the backup will only include files that are locally stored on your Mac at the time of the backup
 
Last edited:
Thank you about that instruction =) I'm wondering would it be better to have local documents synced to icloud document and then you could more easily to have local documents backed with time machine with kind of versioning so I could get same document how it was example week ago.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.