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

Bricoducat

macrumors newbie
Original poster
Jun 14, 2019
3
1
Lyon
Hello
Sorry if it's simple, it's y first post.
This is to bullet proof a Macbook air for an exam.
Mac will be clean installed with only libreoffice, output will be USB key (another Mac in the bag as backup)
I am looking to copy the created file to the usb key every 5 minutes as a backup in case of system failure crash/death. So that only action is to unplug USB and stick it into the other Mac out of the bag.

For the moment I am thinking cp script and crontab

Any better idea ? someone must have done it before me.
 
Sounds like you really don’t trust your computer.
If you’re being paranoid, you might as well do it properly: Have the copy script save the file/folder with a date/time based prefix so if your computer dies while writing to the USB you’ve only lost 10 minutes rather than all your work up until that point.
 
Cron would work. A more Apple/Mac sanctioned method are LaunchAgents. There is an example on the following for pretty much what you want re: every five minutes do something.

https://developer.apple.com/library...stemStartup/Chapters/CreatingLaunchdJobs.html

Instead of doing a copy, can use the rsync command so that only deltas are copied.

But as @Mikael H points out, if system dies while writing, might have bigger issues. Also, from my experience, the brand/quality of the thumb drive can add a level of exposure as some are really slow when writing data. Eg. I have some Lexars I bought a few years back, and they are terrible when writing many small files, not as terrible when copying over one or two large files (but still slow).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.