View Single Post
  #2 (permalink)  
Old 4th February, 2012, 08:44 PM
Redroar's Avatar
Redroar Redroar is offline
Member
 
Join Date: January 2006
Posts: 831

Almost positive you could script it easily and run it as a cron job. It'd just be something like

#!/bin/bash
dirtime=`date +"%m-%d-%y-%H"` #makes a variable with the date and hour. If you change some of the hyphens to slashes then it will create a directory tree for each date, if that's desirable.
rsync -r /source/dir /dest/dir_$dirtime #copies the desired folder recursively and names it based on the time

Note I don't have a linux machine running at this time (damn you ECS!) so I can't test this, but that should work. I don't think having open files will distress it.

Here's a good guide to setting up cron https://wiki.archlinux.org/index.php/Cron
__________________
"this happened to me once, only i kept wiping my nose in my sleep, so it was my hands that were covered in blood when i woke up. i saw my hands, and was like, "dear diary, all i remember is watching half a movie and falling asleep on the couch?" -Ryan North

Last edited by Redroar; 4th February, 2012 at 08:54 PM.
Reply With Quote