AOA Forums AOA Forums AOA Forums Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA Forums > Software > OS, Software, Firmware, and BIOS > Linux

Linux Questions and information concerning Linux


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 4th February, 2012, 01:55 PM
ThunderRd's Avatar
Irreverent Query Chairman
 
Join Date: June 2007
Location: NYC native in northern Thailand
Posts: 2,241

backup a single directory?

Here's my problem:

I need to copy a single directory and its children on an hourly schedule to another location. Some files might be open at the time of the file copy. The copied directories must be somehow sequentially named in the target location, to avoid overwriting of any files in the target directories.

A: Do I need a specific backup program for this? Which one do you suggest?

B: Can I do this with a script, and schedule it as a cron job, using rsync or something like it? Can someone help me with it?
__________________
#1: Tt Armor, ASUS Maximus Extreme, QX9650@4.1G, 8G Corsair Dominator GT DDR3-2000, Corsair HX1050, H2O-Swiftech, Gigabyte GTX470/Arctic Accelero Xtreme Plus II, Intel 520 SSD, Kingston SSD, 2xRaptor 150G RAID0, Win 7 Pro 64
#2: Tt Shark, ASUS P5Q Pro Turbo, Q6600@3.8G, 4G HyperX-1600, Corsair HX850, CoolerMaster V10, 2xASUS 9600GT, 2xRaptor 74G RAID0, OCZ Vertex 4 SSD, Gentoo/siduction Linux [64-bit]
#3, #4: Opteron 170@2.75G nude, A8N-SLI Deluxe, Gentoo

AOA Folding @HomeOur sister site: www.gamersonlinux.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 4th February, 2012, 08:44 PM
Redroar's Avatar
Member
Space Invaders Champion, Takion Champion
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 5th February, 2012, 02:58 PM
ThunderRd's Avatar
Irreverent Query Chairman
 
Join Date: June 2007
Location: NYC native in northern Thailand
Posts: 2,241

Yeah, I thought that might work.

I'll experiment with it and post back if I get stuck
__________________
#1: Tt Armor, ASUS Maximus Extreme, QX9650@4.1G, 8G Corsair Dominator GT DDR3-2000, Corsair HX1050, H2O-Swiftech, Gigabyte GTX470/Arctic Accelero Xtreme Plus II, Intel 520 SSD, Kingston SSD, 2xRaptor 150G RAID0, Win 7 Pro 64
#2: Tt Shark, ASUS P5Q Pro Turbo, Q6600@3.8G, 4G HyperX-1600, Corsair HX850, CoolerMaster V10, 2xASUS 9600GT, 2xRaptor 74G RAID0, OCZ Vertex 4 SSD, Gentoo/siduction Linux [64-bit]
#3, #4: Opteron 170@2.75G nude, A8N-SLI Deluxe, Gentoo

AOA Folding @HomeOur sister site: www.gamersonlinux.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring user access Active Directory - Windows Server 2003 Rondog Mobile Devices and Networking 4 23rd June, 2008 05:12 AM
How do you backup Samuknow OS, Software, Firmware, and BIOS 8 10th January, 2007 06:08 PM
disable apache directory listing r0l0e Data Security 2 20th April, 2003 03:07 AM
Active directory????? mrpcman Mobile Devices and Networking 7 25th January, 2002 09:40 PM


All times are GMT +1. The time now is 12:55 PM.


Copyright ©2001 - 2010, AOA Forums
Don't Click Here Don't Click Here Either

Search Engine Friendly URLs by vBSEO 3.3.0