Backups are stored in separate folders in the backup drive. This saves a lot of space as recentĬhanges are held daily, but older changes are stored only weekly and then monthly. After a few weeks only the first weekly backup of each month is kept. Only weekly backups are held and other daily backups are removed. The script keeps three adjacent daily backups and after three days The script makes daily backups of target folders and keeps user rights and folder structure using rsync. Some say it “works great!”, and others say it “crashed my Mac.Rsync backup script to take daily, weekly and monthly backups automatically Incremental Rsync backup script to take daily, weekly and monthly backups automatically Why can’t we recommend it? The reviews are mixed, to say the least. We can’t recommend this option, but we did want you to know about RsyncX – a graphical version of rsync for Mac OS X. You can learn more about cron here: One Other Option If you wanted it to run every Tuesday at 10 PM, you would type “00 22 * * 2”. Cron uses military time, so if you wanted to run the script at 6:30 PM, you would type “30 18 * * *”. This tells your Mac to run the script everyday at 3:30 AM. Hit the ESC key, and then hold the shift key down while hitting the z key twice to save the crontab entry. Hit the i key, and type in the following command: (It’s located in Application > Utilities.) Type the following command and hit return: For now, I will show you the crontab method and leave launchd for another tutorial. Apple has developed a more sophisticated replacement for cron named launchd. The advantage of using cron is that it will run the script in the background and never open the terminal application. Cron is an old (and free) Unix program used for scheduling jobs. There are other methods of schedule the backup. If iCal Doesn’t Tickle Your Fancy, Use Cron When it comes time to perform the back up, iCal will launch the Terminal application to run your backup bash script. Click on it and select “Other.” Select the mand script from the Documents folder. Under the Alarm option, select “Open File,” and under that it will change to iCal. (It’s located in your Applications folder.) From the File menu, select New Event.Įnter the date and time you want the backup to start. You can schedule backups to run at a desired date and time using iCal. For a nice explanation of the chmod command, check out this link: Don’t Stop There: Automate It With iCal! The “u+x” tells chmod to allow the owner to execute the item. This chmod command is used to change permissions of files and directories. It’s located in Applications > Utilities. ![]() What you have created is a very basic shell script, but first we need to make it executable. command extension allows you to double click on the file and run it in the Terminal application. Name the file mand and uncheck the If no extension is provided, use. Now, let’s save this file in a format that will allow you to double click it to start a backup. Change the /backup/ to the name of your external drive. ![]() The /Volumes/backup/ is the path to the destination or backup copy of where the home folder will be cloned. The ~ is the bash shell’s shorthand for the path to the currently logged-in user’s home directory. If you do not include the -delete option, anything that was deleted or moved will show up in your backup. The -aE tells rsync to preserve permissions and to copy metadata (resource forks.) The -delete tells rsync to make the backup copy exactly the same as the source. You’re probably looking at that command and thinking, What the heck is that?! Rsync is the name of the program we’ll be running. (Obviously, you can change “backup” to the name of your USB drive.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |