Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-21-2009, 09:40 AM   #1
Registered: Nov 2008
Location: Ireland
Distribution: *nix
Posts: 50

Rep: Reputation: 15
Question CPIO backup / configuration

Hi there,

I'm a bit of a newbie, so please bear with me

I have a centos 5.3 server with a DAT72 tape drive. The software we use has a pre scripted CPIO command designed to backup a directory to the tape drive. This worked fine in centos 4.6, but with this new server I am getting an error: Removing leading '/' from member names. This happens when I try and verify the data on the tape.

I know this is to do with absolute or non absolute filenames. What I'd like to do is to revert the CPIO to whatever setting works from centos 4.6

Just one thing, it won't be possible to change the scripted CPIO command as this runs on 100s of servers, and changing it for one server isn't something we want to do.

I'm not sure if the above makes sense, but any help would be greatly appreciated

Old 05-23-2009, 08:40 AM   #2
Senior Member
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Doesn't look like you're getting any response, so I'll jump in. CPIO is such a standard old utility that I wouldn't think it should have changed. It seems to me that the more likely culprit is your environment. Are you running the script from cron or from the command line? Same user? Can you look at the complete list of environment variables and which shell you are running when it is executed (on both systems)? If that doesn't give you the answer, maybe give us some more detail and/or post the script?

Wow. 100s of servers? Every one with it's own tape drive and backup script? Who changes the tapes? I guess either the same tape stays in for a long time (indefinitely?); or you are a VAR, and it is your customers who have the servers and change their own tapes. Otherwise, the labor scalability would seem to be a major issue -- obvious situation for implementing a modern tape library and a network backup solution.
Old 05-25-2009, 09:28 AM   #3
Registered: Nov 2008
Location: Ireland
Distribution: *nix
Posts: 50

Original Poster
Rep: Reputation: 15
Hi choogendyk,

Thanks for your reply. The script is being run by cron. But we tested it at the command line as well; same result. Always as root. We didn't have time to analyse the server as you describe as we had to ship it to site (deadlines deadlines!)

Anyway, we got around the issue by putting an IF statement in the script which checked what OS is running and changed the CPIO command to suit. We tested this on a number of older servers to ensure backward compatibility (back as far as RH 6!). This seems to work ok for us, so we're going to run with it.

* * *

Yes, roughly 450 servers, but they are all deployed on customers sites, so we aren't changing tapes ;-) That would be a nightmare!

Thanks again for your reply.

Code we used:
if [ "$LINVER2" = "CentOS release 5.3 (Final)" ]; then
cpio -itvB --absolute-filenames -I"$DEV" 2>>"$RESULT" | cut -f2-20 -d"/" | cut -f1 -d" " > "$VERIFY" 
cpio -itvB -I"$DEV" 2>>"$RESULT" | cut -f2-20 -d"/" | cut -f1 -d" " > "$VERIFY" 
Old 05-25-2009, 09:51 AM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
My version of cpio doesn't have an --absolute-filenames option. It does have a --no-absolute-filenames option however. Could the default have changed? Maybe you need to remove the --absolute-filenames option for CentOS 5.3. Check the manpage for cpio on both systems, and any release notes for cpio in /usr/share/doc/.

You haven't posted the parts of your cron script that indicates from which directory backups, restores & verifications are run from. Using relative addressing & modifying the CWD of your script if there are changes between versions may be more maintainable, and allow restores even if the base changes.

The message you posted sounds like a warning rather than an error. It sounds like it is verifying the files from the backup using relative directory addresses rather than absolute. If that is the case, make sure that the CWD is /, then there will be no difference.

Maybe you want to base your test on the version of cpio instead of the distro version. I.E. cpio --version.

Last edited by jschiwal; 05-25-2009 at 10:02 AM.


backup, configuration, cpio, filename

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Full Backup With Cpio! grim2 Linux - General 6 02-09-2012 06:43 AM
CPIO Backup End of Media rma1 Other *NIX 3 10-30-2008 11:19 AM
Cannot fork after running CPIO backup sgamble2 Red Hat 1 10-28-2006 07:13 AM
retrieving tape backup after using cpio and gzip jazbinschek Linux - Newbie 8 12-29-2005 10:31 PM
Using cpio to backup to CDROM Cyberhund Linux - Newbie 3 07-21-2004 01:49 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration