Integrity check for the backup


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Integrity check for the backup
# 1  
Old 05-30-2014
Integrity check for the backup

Hello
I thought of different ways of integrity check for the backup and look for the fastest approach to start programming.
in all these approaches randomness is used.
I would appreciate if someone give more suggestions or correct me.

1- Machine Name Check We can check if the machines were backed up.
• Randomness should not be used in this approach.
Advantage:
- Easy to implement
- quick
Disadvantage:
- ???

2- Timestamp
Timestamp on the file and directories will be checked to be sure if they are the same. This approach needs to compare the timestamp in the file system with the timestamp of a specific file which is stored in the backup. Timestamp is stored in the file system table, so one can look and figure out what the last modified timestamp for a certain file is.
Advantage:
- Easy to implement
- Need not to restore any Data
Disadvantage:
- The content can not be checked

3- Size
Advantage:
- Need not to restore any Data
- Fast Approach
Disadvantage:
- The content can not be checked. two files can have a same size, but two different content

4- Checksum
Advantage:
??
Disadvantage:
- Files need to be restored
- Collision may happen

5- Comparing Byte by Byte
Byte-by-byte comparison of files means that the contents of two files to be compared, is read byte-by-byte (in parallel) and checked for equality.
The cmp utility compares two files of any type and writes the results to the standard output. By default, cmp is silent if the files are the same; if they differ, the byte and line number at which the first difference occurred is reported.
cmp –l file1 file2
Advantage:
- 100% accurate
- Fast as it does less calculation
Disadvantage:
- Expensive for the big files
- Files need to be restored

and I also have a question:
what are the advantages and disadvantages of doing randomness in comparing?

Thanks

Last edited by frhling; 05-30-2014 at 07:32 PM..
# 2  
Old 06-02-2014
You have to trust your backup to a certain extent. The data is likely to change during the actual backup process or during the verification. You really need to ask yourselves these questions first:-
  • What are you backing up?
  • What is the size?
  • How you would recover?
    • What is the minimum you need to restore?
    • Have you got recover hardware for a server loss?
    • What backup catalogues you need?
    • Have you secured this all off-site?
  • How long does the backup need to be retained?
  • Is there a way to freeze the data (switch to backup mode) for databases?
.... and probably a whole bunch of other things.

Media failure is less error prone these days, but in any case there should be an error on the return code you should check for. Consider dual tape backups and/or incremental versus everything every day.

It's too big an overall question to deal with just worrying about how to verify it. It may be that you have answered many of these for yourself already, but if you share what you are planning, you can get a consensus if it is a valid approach or suggestions of other things you need to consider.



Robin
# 3  
Old 06-02-2014
I agree with rbatte1.

Firstly, what are you trying to achieve? Is this some kind of academic exercise?

The basic backup utilities like cpio, tar and ufsdump were written years ago by people who did their homework. Most of us use these utilities (or other more expensive backup suites) to implement our backups. If these utilities were 'faulty' they wouldn't have been released as part of the O/S otherwise there would be uproar.

The main considerations we take into account are:

1. Did the backup job exit in a non-zero state, ie, with an error, eg, backup job lost communication with the volume being backed up.

2. Was there a full system crash during the backup that stopped it?

3. Is the media holding the backup readable (eg, is the tape too old and knackered)? Verify this by listing the media, possibly to a file, and then counting number of lines in the file to tell you the number of files backed up. A script could notify you if the number is "out of range".

Even if you run a backup in single user mode some files will still change between backup and verify, eg, log files.

You don't need everything to be exact to the trillionth bytes to perform a full system restore and get the system on its feet.

So tell us all some more information about the need.
# 4  
Old 06-11-2014
Actually I have nothing to do with backup as a software already does it. I have just to monitor the file systems and keep track if they are really backed up due to the high availibility cluster architecture which is used so it would be difficult to keep track if file systems are backed up ok.
as I created some big files and compared the two files with CRC, MD5 and cmp(Byte by Byte), I see Byte by Byte is a faster approach.

for the case that some files change between backup and verify I have thought of this: If timestamp of file > timestamp of backup: go to the next file

I think what you explained has more relation to backup and not monitoring file systems.
# 5  
Old 06-11-2014
Well, not wishing to be pedantic, but the title of the thread is Integrity check for the backup so I'm sure we all assumed that you wanted help with the backup. You first post seems to confirm this.

Smilie So infuriating, I have no further comment. Smilie
# 6  
Old 06-11-2014
Well I'm afraid that you've lost me too!!!

I don't understand what you are trying to do. The backup is already taken care of (by what software?) but you want to run some other check. To achieve what? Or catch what? But you also indicate that if the file(s) have changed since the backup cycle and verify cycle, then you're going to skip over them.

I definitely need more input to help me understand the requirement here.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

data integrity check needed

Hi friends I need copied 100gd of data to other Solaris server. Could anyone help me guiding appropriate way of checking data integrity at source and destination so can I delete the data at source location . How can print/check cksum of individual file in each folder and match it with... (7 Replies)
Discussion started by: hk_kamozalwar
7 Replies

2. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

3. Shell Programming and Scripting

check mail backup cron job

i have just installed a cron job to run at 3 in the morning once a week. It's difficult for me to test if it works because the email backup program takes the email service down before running the backup. I wondered if i could ask you gurus if this would work? 0 3 * * 0 ... (1 Reply)
Discussion started by: timgolding
1 Replies

4. Solaris

File Integrity Check

Hi, I have two NFS shares mounted on a solaris system. share1 and share2 , both are from different NFS servers share1 has 500GB of data share 2 is empty. I am copying all the data from share1 to share2. It is like migrating the data from one NFS share to another. Is there... (8 Replies)
Discussion started by: athreyavc
8 Replies

5. UNIX for Dummies Questions & Answers

Check that backup MX actually does its job

Hey! I have just configured an backup MX using Mail::Toaster under FreeBSD. As I'm a novice when it comes to mailservers, I need to ask someone how to check that this backup really does its job. My primare MX is unfortunately on a Dynamic IP line, but its unsusual for it to change the IP.... (4 Replies)
Discussion started by: noratx
4 Replies

6. UNIX for Dummies Questions & Answers

Check backup file size on backup tape

Hi, I performed backup on tape and I want to append more files to my previous backup on the same backup tape. But before I do that I need to know the backup file size of the first backup I performed so that I know the available size on the backup tape. Can someone help me what command I will use... (0 Replies)
Discussion started by: ayhanne
0 Replies

7. AIX

Check the backup dates on Tape

Hi all I am using IBM machines with tape drive, what i do is go to informis and i insert the tape and run the command "ontape -s -L " and the level of backup that i want to take. Now what i want to check is which days are the backup being run, does the system create a log and stores info where... (0 Replies)
Discussion started by: masquerer
0 Replies

8. UNIX for Advanced & Expert Users

How to check the size of the backup from the tape?

Hi, How can I check the size of the databse/filesystem in the tape (4MM or 8MM)? For example, I want to restore some databse/filesystem backup to the system. Before that I wanna check the size of that from the tape.Please help me regarding..... Regards, Sharif. (0 Replies)
Discussion started by: sharif
0 Replies
Login or Register to Ask a Question