Backups are being taken on Dat DDS4 format OS RHEL 5.0. The command is used tar -cvfr /dev/st0 File name. Thus the backups are being taken no of times in one Dat. How to restore the backup of a file which has been taken after first occurence?
Software/Hardware used: RHEL 5.0 + IBM quard Processor
Cited from the GNU tar documentation:
http://www.gnu.org/software/tar/manual/tar.html#SEC58
============================================
If you use ‘--append’ to add a file that has the same name as an archive member to an archive containing that archive member, then the old member is not deleted. What does happen, however, is somewhat complex. tar allows you to have infinite number of files with the same name. Some operations treat these same-named members no differently than any other set of archive members: for example, if you view an archive with ‘--list’ (‘-t’), you will see all of those members listed, with their data modification times, owners, etc.
Other operations don't deal with these members as perfectly as you might prefer; if you were to use ‘--extract’ to extract the archive, only the most recently added copy of a member with the same name as other members would end up in the working directory. This is because ‘--extract’ extracts an archive in the order the members appeared in the archive; the most recently archived members will be extracted last. Additionally, an extracted member will replace a file of the same name which existed in the directory already, and tar will not prompt you about this(10). Thus, only the most recently archived member will end up being extracted, as it will replace the one extracted before it, and so on.
There exists a special option that allows you to get around this behavior and extract (or list) only a particular copy of the file. This is ‘--occurrence’ option. If you run tar with this option, it will extract only the first copy of the file. You may also give this option an argument specifying the number of copy to be extracted. Thus, for example if the archive ‘archive.tar’ contained three copies of file ‘myfile’, then the command
tar --extract --file archive.tar --occurrence=2 myfile
would extract only the second copy. See section —occurrence, for the description of ‘--occurrence’ option.
============================================
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 2  Replies