LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-04-2005, 05:21 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Rep: Reputation: 31
moving a file sequentially to different machines nightly


Iím trying to think of a way to rsync one file each day to a different machine and before I started I was kind of wondering what some of you might do or suggest.

I have a Linux cluster with 43 nodes in it. Well about 2 weeks ago the hard drive on the head node broke beyond any rescue attempt. I did have a few week old backup, so I was okay but I was thinking there must be a better way to have a current backup with the resources that I already have.

What Iíd like to do is have a nightly snapshot of my /home and *.conf files compressed into one file and then moved to a different node each night starting with node1, ending with node 43 and then starting over again continually. That would give me a 43 day window, which would be perfect.

I have a script that already runs weekly but Iím not sure how to tell the job to use the next node the next day and on and on. (i.e., node1, node2, node3, etc) How would some of you suggest I do this?

As always, thanks!
 
Old 12-04-2005, 05:28 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
well if you do want 43 copies, then that's not going to fit over anythign nicely, so i'd say it's easiset to keep track of the value in a config file, just read the file at the start, and write the contents plus one back to it afterwards... What i'd lean towards doing instead though is using days of the month, and leaving 12 of those nodes out of the picture, that way you just automatically snd the backup to host$(date +%d) or something.
 
Old 12-04-2005, 05:42 PM   #3
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
Thanks for the advice Acid. I don't mind having 43 copies of my backup is because each node has 350gig and I have my script clear out the directories on the remote node before copying in another job.

So are you kind of hinting at maybe making a daemon or something that reads/writes to a file to keep track of where it's at? Thanks for the quick response!

Last edited by mijohnst; 12-04-2005 at 05:44 PM.
 
Old 12-04-2005, 05:44 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
i don't mean that it's too many copies, just that if you use the day of the month, you'll have really simple access to a number between 1 and 31 which changes daily, it does the "hard" stuff for you... you have a cron job already i assume that runs every day? just tag in the right date command and instantly it goes to a different machien every day of the month.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I find the nightly builds? linuxnube Fedora 3 03-14-2005 07:13 AM
File sharing between two linux machines sridharanvinod Linux - Distributions 2 02-01-2004 11:23 AM
Help, system is rebooting nightly.. BxBoy Linux - General 3 12-18-2003 03:21 PM
Nightly Build ISO MikeeX Slackware 2 07-14-2003 06:59 PM
Automatic Nightly reboot locke Linux - General 1 02-10-2002 02:06 PM


All times are GMT -5. The time now is 07:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration