Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an online backup utility ( And i scheduled an upload of projects folder every day at 12pm. Thing is my projects folder contains a lot of files so i thought the best I could do is to write a code to automatically zip the folder before it gets uploaded each day.

I have no knowledge of python or other mac languages in order to get this done. So help is really appreciated! :)

share|improve this question

migrated from Aug 12 '12 at 23:49

This question came from our site for professional and enthusiast programmers.

Incremental backup will be slower, not faster. Find out if you can compress the communications between the client and the server instead. – tripleee Aug 12 '12 at 11:15
Why do you think I'm trying to zip my whole projects folder to one file before i upload? :p – Ilya Karnaukhov Aug 12 '12 at 22:56
What I'm saying is: If your backup copies a new unique file of 20M every day instead of sending 1M of diffs to 20 small files, you are not making it faster. If you can compress those diffs on the wire, you could be better off (but if the client is competently written, it already compresses its communications channel). – tripleee Aug 13 '12 at 4:37

You can write a script to compress your file - and then use the cron command to schedule it run it daily at the time you want.

share|improve this answer

The best thing you could do is create a little script that could compress your files. You can add the script as a crontab and set the time daily at 12pm. I am not sure if you would also like the script to SEND it to the server, but that would be easily possible.

You can check the python page here; and crontab page here;

Good luck.

share|improve this answer
Looks promising. I was also thinking of something like this. But how do I write a cron for a mac? Could you also give me the code or at least an example of how to do this? I have no knowledge of Python.. :( – Ilya Karnaukhov Aug 12 '12 at 13:41

Edit the crontab with crontab -e (or EDITOR=nano crontab -e) and add a line like this:

59 23 * * * cd ~/Notes; zip ~/Documents/Backups/Notes\ `date '+\%Y-\%m-\%d'`.zip *.txt

The format is minutes hours days months weekdays command. 0 */2 * * 1-5 would run a command every other hour on weekdays. % has to be escaped as \% in the command field.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .