[SOLVED] Restoring differential backup files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [SOLVED] Restoring differential backup files
# 1  
Old 09-05-2012
[SOLVED] Restoring differential backup files

I'm using a script (automysqlbackup) to dump mysql db's to .sql file followed by taking one full backup of the .sql file and the differential backups of the newer sql file every day using the tool diff.

Now the backup destination folder contains files like,

Quote:
--- testdatabase.sql - first day - 1 MB
--- testdatabase.diff1 - second day - 200 KB
--- testdatabase.diff2 - third day - 140 KB
I would like to how do i restore from these backups, say if I want to apply the diff1 to the full backup file testdatabase.sql.
# 2  
Old 09-10-2012
Were you using the UNIX diff and with some options like -e for ex output? The diff -e output can be used with ex to rewrite the older files forward:
Code:
(
cat diff files
echo "w <new_file_name>
q"
)|ex <copy_of_original_file_for_safety>

# 3  
Old 09-10-2012
Generally it'd be patch originalfile diff-file

But depending on how you made the diff's there may be other options involved. Backup before trying of course.
# 4  
Old 09-11-2012
Yeah, the patch tool is the one I was looking for. Thanks dude!
This User Gave Thanks to csengineer For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Restoring a system from a backup

I have backed up the contents of my Solaris 10 machine in its entirety, and I'm trying to figure out if I can somehow use this archive to restore my old system just as it was on a new machine. Assuming I have all files from my old machine backed up, is this possible? What I've been trying to do... (6 Replies)
Discussion started by: unblockable
6 Replies

2. Shell Programming and Scripting

Restoring files from backup based on ctime

Hello, I need to restore some yesterday emails from backup within a 5 hours timeframe this is a openvz container, backup is made by rsync files to another partition in the same server I have tried to do this #!/bin/sh cd /vz/backup/414/home/smartftp/mail/domain1.com/ for dir in new... (6 Replies)
Discussion started by: cuantica
6 Replies

3. AIX

restoring mksysb backup of a clustered server configured in HACMP

Hi, I have done NIM restoration via nim_bosinst a lot of times but I have some doubts on restoring a server which is clustered specifically HACMP. Previously, I don't know the trend but after doing a nim_bosinst, I can see the client's hostname is back to "localhost" rather than its original... (0 Replies)
Discussion started by: depam
0 Replies

4. UNIX for Advanced & Expert Users

how to make a full system backup excluding data and restoring it to a new system

Hi, In order to have a sand box machine that I could use to test some system changes before going to production state, I'd like to duplicate a working system to a virtual one. Ideally, I'd like to manage to do it this way : - Make a full system backup excluding the user file system (this... (7 Replies)
Discussion started by: pagaille
7 Replies

5. UNIX for Dummies Questions & Answers

Tar differential backup

I am backing up some data to an NTFS formatted backup drive. I have to preserve the Unix permissions of the data being backed up and therfore use backup into a tar file. I would like to backup the differnential data in the tar file similiar to how Rsync works so as to save on backup time as it... (1 Reply)
Discussion started by: jelloir
1 Replies

6. AIX

Question about restoring from mksysb backup

Hello, Last night I applied a DB2 fix pack which is now causing problems with the application that uses db2. Prior to applying the fix pack I did a mksysb(rootvg) which includes the file system that has db2 installed on it. If I do a restore from this will it restore the db2 version back to... (1 Reply)
Discussion started by: jyoung
1 Replies

7. UNIX for Advanced & Expert Users

restoring backup using tar command

Please help me in resolving the issue. I have taken backup using the below command $ tar cvf - . |compress -> /opt/globusback2/needed_backups/apglsg.tar.Z I tried to restore the backup using the below command. $ zcat /opt/globusback2/needed_backups/apglsg.tar.Z | tar -xvf - ... (5 Replies)
Discussion started by: amirthraj_12
5 Replies

8. UNIX for Dummies Questions & Answers

restoring backup using tar command

Please help me in resolving the issue. I have taken backup using the below command $ tar cvf - . |compress -> /opt/globusback2/needed_backups/apglsg.tar.Z I tried to restore the backup using the below command. $ zcat /opt/globusback2/needed_backups/apglsg.tar.Z | tar -xvf - ... (2 Replies)
Discussion started by: amirthraj_12
2 Replies

9. OS X (Apple)

OS X Server: Trouble restoring mail from backup...

So I had some bad RAM in my server. Of course I didn't know it at the time. And it kept making the 10.3.5 updater crash. And that last crash did it. My drive was messed up. So I had to reformat and reinstall. Luckily I had a whole slew of fresh backups. But I'm really hung up on the mail. I backed... (0 Replies)
Discussion started by: l008com
0 Replies
Login or Register to Ask a Question