Check Home Folder and Only Copy Modified Files [SOLVED]

I know this is probably a more complex thing and I don't even know if it's possible at all with just KM, but let me see if I can explain what I need:

My Home folder is currently at around 1TB and what I would like to do once a day is to run a macro that checks that folder and all modified/new files will be copied to a specific location and new folder while maintaining the folder structure and giving that new folder the current date.

I would like to use a service such as Dropbox/Google Drive/iCloud to store only modified files, not the whole Home folder, similar to how CarbonCopyCloner creates the SafetyNet folder inside the backup disk (for those familiar with that app and the SafetyNet feature works).

So for example if I have 10 files on my Home and I modified 2 of them, once I run the macro, it would create a new folder inside my DB/GD/iC folder with the current date and with only those 2 files, while maintaining the folder structure. And it would keep doing this for every time I run that macro. I don't mind if it takes a while to run, because I will run it before going to bed anyway. I already have 3 backup disks, but I would like to have a remote option, at least just for the modified files.

Is this possible? I don't have a way to have a remote backup at the moment and this is the only alternative I can think of, but I don't want to pay for space (DB/GD/iC) I don't really use and I also don't want to put all my files in the cloud if I don't have to.

EDIT: I'm getting closer using Hazel, but I don't think I will be able to do this with Hazel: I want to create a new folder inside the destination folder, give it a name and add the current date, then grab ALL folders/files inside the root of the destination folder and move them to the newly created folder (with the current date).
How can I do this with KM? And I'm thinking that maybe I should have some kind of "log" saved somewhere so when it creates that folder with the current date, next time I run the macro, it won't include that new folder, only the files I recently copied. So every new "current date" folder I create, will be added to the log and KM will now that those folders are not to be moved to a new folder. Hope it makes sense?

Modified since when? When you run this tonight, do you want yesterday's/last week's files to remain in the cloud?

Creating a new cloud folder for "today" and copying files created/modified "today" to that is easy enough. Maintaining the folder structure for those files is a little more difficult, though you could probably do it by combining find -mtime and rsync --relative in an "Execute Shell Script" -- depending on the cloud service you may have to build the "mirror" in a local directory and let that sync over (not all play nicely with rsync).

Honestly though -- for the amount of faff involved and the probability of it not working right just when needed, I'd spring for the modest cost of the online storage upgrade and use the service's utilities to do my entire home folder. A couple of quid a week for peace of mind...

If you're looking for an easy solution that's also separate from your other cloud storage (just in case) I've still got a soft spot for BackBlaze. Don't be put off by the $ pricing -- they have a data centre in the Netherlands, so transfer speeds are good and you're still covered by GDPR etc.

Modified since the last time I ran the macro, that's why I mentioned the log, so KM would keep track fo the files.

But as I mentioned, Hazel is a good bet and I was able to "kinda" make it work when it comes to copying the files. I still need to run a few tests, but I'm 99% there.

But to answer your question, yes, all my files would be available in the cloud until I delete them, but each "backup" would be inside its own folder like:
Backup May 5, 2023
Backup May 6, 2023
etc

For now it seems that this is the only thing I need, if Hazel does the job as expected.
So for example if I have 10 folders and files inside my cloud folder, I would like KM to grab all of them and move them to a new folder with the name "Backup [CURRENTDATE]". Then next time I run the macro, KM would do the same, ignoring all of those "Backup" folders.

The thing is, as I mentioned, I don't want to have all my stuff out there in "the wild" like that. As much as most companies are, apparently, pretty safe and private nothing truly is 100% safe or private. This remote backup is really just a way to keep the most recent files safe. I have 3 daily backup drives (I always carry one with me whenever I go, because it's like a small wallet, so it fits my pocket), plus 2 I backup weekly that are in a different place in the building (my studio is in the basement and my house is on the 3rd floor). Even though they are in separate floors, it's still the same building. So yeah, a remote backup with those more important modified files are what I need.

Meanwhile I was doing some research on the For Each action and the Finder's Selection option and I'm now able to do what I need using both Hazel (checks the modified files) and KM (moves those files to a new folder called Backup [CURRENTDATE] where all my other backups reside

ForEach.kmmacros (21 KB)

Keyboard Maestro Export

image

Most, if not all, of these services allow you to select what does does or doesn't get backed up, even if only at the folder level. So you could omit your more sensitive data, or restrict them to only the "Projects" folder, etc.

And any reputable cloud service lives and dies by its security -- the average person is generally more at risk of giving their data away (phishing attacks, harvesting by social media, accidental reveals on forums) than of having it "stolen".

But if you've come up with a solution that both works reliably and meets your personal "risk assessment" -- great!