LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2010, 05:49 AM   #1
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Rep: Reputation: 15
backup script causing data to be lost on main server- RHEL


hi
this is a strange one for me. i setup the following script ro run each night (12am) as a cron on the main server:

if mount | grep -q '/home';
then
rsync -ranv --delete /home/ 138.73.56.12:/home;
else
exit 1;
fi
##

the main server is running on a dell poweredge 2600.
The script rsyncs to a virtualised duplicate running on a hp dl380.

when i set this script up and begn running data started going missing from the main server. if new files had been created the files by staff they would go missing, if data was added to existing files prior to activating the script the new changes made to that file would be lost.i just cant understand why this happened. as soon as i turned the script off after a few days it was all back to normal but the data that had gone missing had gone missing.
i just wanted to know if this could be a disk read/write issue, was the script running too soon not allowing data to be written before it can be backed up? could it bee memory? i just dont know.
another developed occured after a few days of all this happening, which was one of our hard disk from the main server started mis behaving and flashing amber (attention). could this have caused the problem?
i guess what i want to know is what was the likely casuse. i hope with users experienced in such a scenario can help
 
Old 02-15-2010, 08:11 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
The 'n' argument to rsync will result in a dry-run, no changes will be made. Are you sure there is data being written to the remote host ?

If files are disappearing/not being written then chances are it's the failing disk.

cheers
 
Old 02-16-2010, 05:45 AM   #3
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
kbp
thanks for your post. checking on the backup server data was being copied accross. what i dont understand is that data was being written to the main server and people were opening their files again after a few days to continue work only to find the data had gone missing? could that be because when data is worked on from the main server, the changes to the files are only in memory until some point later in the day? the main server config is poweredge 2600, raid 5 hardware across 4 disks.
i just cant imagine the rsync cause this. but on the other hand when i stopped rsync script everything was back to normal...
 
Old 02-16-2010, 06:46 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Can you confirm that /home is actually mounted from local disk ?
 
Old 02-16-2010, 07:40 AM   #5
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
hi kbp
for sure /home is mounted. i think it was probably the faulty hard disk you mentioned..
 
  


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
Need to change mail from backup to main server fiona333 Linux - Newbie 1 11-07-2009 11:10 PM
HOW TO MAKE backup script LINUX CentOS5 copy data to another machine ytd Linux - Newbie 8 09-30-2009 02:54 PM
How can I take Backup of my RHEL server RajendraKumar Linux - Enterprise 2 08-11-2006 03:14 PM
Backup of RHEL server RajendraKumar Linux - General 1 08-02-2006 12:37 PM
error in backup script, deleted almost all data :( ash4stuff Linux - Software 0 06-11-2004 07:58 AM


All times are GMT -5. The time now is 08:54 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration