How can I use Automator or AppleScript to regularly backup a specific folder?

I want a AppleScript to do this:


  1. Create a new folder named by current date and time (YYYY/MM/DD_HH:MM:SS) at /Users/suletao/Library/Mobile Documents/com~apple~CloudDocs/minecraftBackup
  2. Duplicate the folder "versions" at /Users/suletao/Library/Application Support/minecraft to the new folder just mentioned.


Is there anyone can help me out? I don't know coding. Sorry for any misunderstanding might occur, because I am still learning English.


Thanks in advance 🙏

MacBook Pro Apple Silicon

Posted on Dec 9, 2022 3:05 AM

Reply
3 replies

Dec 12, 2022 9:21 AM in response to Tao_123

Hey there, and welcome to Apple Support Communities Tao_123,


We can certainly understand your concern and can help provide some insight.


You can use Time Machine backup to save all your folders when needed. We recommend checking out these steps on how to use Time Machine backup in order to save your files.


" Make a backup

After you select your storage device in Time Machine settings, Time Machine automatically begins making periodic backups.

To start a backup manually, without waiting for the next automatic backup, choose Back Up Now from the Time Machine menu  in the menu bar.

Use the same menu to check the status of a backup or skip a backup in progress. For example, if a backup is underway, the menu shows how much of it is done. When a backup is not underway, the menu shows the date and time of the latest backup.

Time Machine menu showing a backup in progress

Backup is underway

Time Machine menu showing details about the latest backup

Backup is completed

 


Backup frequency and duration

Time Machine makes hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for all previous months. The oldest backups are deleted when your backup disk is full.

Beginning with macOS Ventura, you can change the backup frequency: Open Time Machine settings, click Options, then choose a setting from the “Back up frequency” menu.

The first backup might take a long time, but you can continue using your Mac while a backup is underway. Time Machine backs up only the files that changed since the previous backup, so future backups will be faster. 

If a Time Machine backup takes longer than you expect "


For additional information, we recommend checking out these links: Back up your Mac with Time Machine - Apple Support & Automator User Guide for Mac - Apple Support


Kindest regards!



Dec 12, 2022 10:43 AM in response to Old Toad

👍+1


This is exactly what I do, and it works like a charm. Reliable and I don't have to think about it.


However, CCC does not create individual new folders named by current date & time; it updates the existing folder at the target location. Do you just need a current backup of your minecraft folder or for some reason do you need separate, date/time stamped backups?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I use Automator or AppleScript to regularly backup a specific folder?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.