LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   When did I backup data to tape (cpio, Red Hat Enterprise Linux ES release 4)? (http://www.linuxquestions.org/questions/linux-general-1/when-did-i-backup-data-to-tape-cpio-red-hat-enterprise-linux-es-release-4-a-920839/)

jnai 12-28-2011 04:13 AM

When did I backup data to tape (cpio, Red Hat Enterprise Linux ES release 4)?
 
How do I find out the exact date and time I backup data files to tape by using 'cpio' command on Red Hat Enterprise Linux ES release 4 server, please. I have a number of tape cartridges which were not labeled properly so now I do not know when I did the backup.
--

rknichols 12-28-2011 11:14 AM

You have my sympathy. Alas, there is nothing in a cpio archive to indicate the time the archive was created. About all you can do is make a listing of the archive contents ("cpio -itv") and process the output to find the most recent date therein. Even that is not going to be 100% reliable because it is always possible that someone marked a file with a time stamp far in the future. If these are complete system backups, perhaps you could use the time stamp of the newest file in /var/log as a surrogate for the creation time of the archive.

And, I just realized that only the date and year (no time) are shown for time stamps not within the past year. You might have to write your own program to parse the (simple) cpio archive format if you need complete time stamps for older files.

jnai 12-28-2011 09:06 PM

Thanks very much for your help.

Sorry for keep continue asking; alternative to "cpio" commands, I'm thinking about "tape tool" commands which we could use to find out the date and time when the tape cartridge was last used/backup. Are they available (the said "tape tool" commands)?
--

rknichols 12-28-2011 11:54 PM

You would have to ask someone with knowledge about the exact type of tape drive and cartridge you are using. I don't know of any tape drive that embeds such information in its data format, but I suppose it's possible (if the drive had some way to learn the current date and time, of course).

jnai 12-29-2011 12:15 AM

Thanks again rknichols; I will continue to find out to see if it is available.
--


All times are GMT -5. The time now is 12:33 PM.