Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

Saving portions of a large file - theoretical problem

Lets say you had a large file (e.g. 500mb big). You were told that the following sections of the file had been modified:

0mb - 1mb
1mb - 2mb
50mb - 51mb

And you wanted to copy those blocks of data out of the file, saving it as a backup somewhere that is about 3mb big.

You're told that at some point in the future you will have to restore this file based only on a) the original file, and b) the blocks that you saved. You will have to merge them to recreate the file from it's two parts. When the time comes, you won't have any special premade tools to do it with, short of maybe a readme.txt that you wrote for yourself. You'll only have regular windows or linux commands and software, and whatever you can easily google up.

If you knew this situation would happen, and you could store those 3 megabytes of data in any format you desired, how would YOU go about storing the blocks of data such that you would be able to restore it later?

I'm trying to explore the idea of backing up only portions of a file, but doing it in such a way that any relatively knowledgable person could restore the backup without any special software. It is kind-of a theoretical question, not looking for any concrete solutions, just some ideas.
0
Frosty555
Asked:
Frosty555
1 Solution
 
jgmontgoCommented:
Im not too sure such a theoretical situation might exist where A) one could successfully backup part of a file without special software and b) that any relatively knowledgable person could restore the backup without any special software.
There is already software that, in one way or another, already addresses this kind of situation. That said here goes.
The problems that one must overcome might include a) how to know that the original file was not modified after the backup, assuming it is time to restore the file. Then b) exactly how are you going to place those contents in just the right location of the file. My concern would be primarily for the integrity of the data.
It is not a problem (using simple off the shelf or OS provided tools) to reassemble a file that is broken into multiple pieces, the problem is restoring one or more section of data that needed to be restored.
If I were to attempt this I would store the file in some sort of binary format, not knowing what kind of file I was dealing with. Of course, if I knew it was a text file that would be a different matter. The data, as it turns out, is as imporntant as the question. An executable, sound file, graphic file, etc is one matter and a text file is entirely different. Then you have database files, this might be easier if it were a database, but then you would need the database tools to allow this to happen.
The application I was referring to is Acronis True Image. While it is not absolutely unique, there is a feature that speaks to what you are asking here. They have the ability to backup an entire drive, partition or set of any of the above as an image. If you were to restore that backup you would have what you started with. What makes them unique is the fact that they allow for an incrimental image backup. In other words, if something changes only the changes are backed up. Now I do not know if they backup just the changes or the entire changed file, but I do know that the backup is very efficient. The restore is equally interesting. If you have a years worth of daily backups, you can pick a single file from a single day, or the entire image from that day, at any point in the backup archive.
 
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now