Saving/Copying a directory to USB every 5 minutes

Discussion in 'Mac Basics and Help' started by Bricoducat, Jun 14, 2019 at 6:31 AM.

  1. Bricoducat macrumors newbie

    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.
  2. Mikael H macrumors 6502a

    Sep 3, 2014
    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.
  3. NoBoMac macrumors 68020

    Jul 1, 2014
    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.

    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).
  4. StralyanPithecus macrumors regular


    Sep 27, 2018
    or you can use FreeFileSync ( ), they have both Mac and Windows versions with realtime sync. I use it in both Windows and MacOS without any issue. Ah and it's free, but you can donate to them if you feel so. (I did).
  5. Bricoducat thread starter macrumors newbie

    Works once you figured out how to use autosync

Share This Page

4 June 14, 2019