problems with tar multivolume

HI there,

I need to backup some files from other pcs.
I want to do it from my backupserver.
I am using Unicon (developed from icon) for programming a backupscript, my BS is Mandrake Linux.

The problem I have is:
I cannot use tar multivolume with dd

the command looks something like this
ssh fileserver 'tar cMf - /file' | dd of=/tapedrive

if I use tar --tape-length with it, dd stops writing after the first tape change, but does not continue.

I tried to mount my files and then do the backup only with tar, but then i got the message: cannot open: permission denied.

I tried to find something in the internet but most have problems with extracting tar files.. I can't even create them.

i'd be glad for any help

thx

The permission denied is possibly from the user not in the same group or owner of the tape drive. On our SUN server the tape drive is owned by root - group sys. Adding a user to the sys group allows backups to work (using tar or ufsdump). You may have the same type of situation. Check the permissions on the tape drive. Add the user to a group such as sys (of course, you must understand this is a security risk).

We set up a generic account that was allowed rsh from all servers to the backup server. This allowed us to move the data (for Y2K). It hasn't been used since. Part of the script was to move a new host.equiv file on the backup server into place. This allowed the generic account access. When the backups were completed, it was moved out of the way, closing the hole.

first at all thx. :stuck_out_tongue:

I can use the tapedrive as root, when i do normal backups, it just don't work with the mounted filesystem. :confused:
I thought the permission denied was from the mounting, not from the tapedrive.

As I said, the backup with tar, ssh, and dd works, just not for multivolume. (and I do that to tape, too)

Well I'll check the permissions and try again.
:smiley:

Does anyone has a working multibackup programm for tapedrives?
I'd be thankful to take a look at those how you did it.

I checked my permissions and started another try...
with the same result.
I (as root) have permission to the tapechanger, and to the mounted files... but i still get the error

mounted/file : cannot open: permission denied

*sight*
:frowning:

That's crazy. Try this:

ssh fileserver 'tar cMf /tapedrive /file'

If you want tar to work with multiple volumes it must know that it is writing to a tape drive. At least the stardard tar does, you seem to be gnu's tar, which I have never used.

In a later post you say "I tried to mount my files". I sure hope so. tar isn't going to work with an unmounted filesystem. Are you trying to remote mount them via nfs? If so, when you export them or share them you must explicitly allow root access otherwise root will be mapped to nobody.

that's what i would do, too, if my tapedrive would be connected to the fileserver. But it is on the backupserver....
sorry, if i did not say that.
so I need to pipe the data back to my backupserver.... and that is the problem.

You would seem to be up the creek without a paddle. :frowning:

Usually, when a large unix shop has a dedicated backup server, it will acquire some software to handle things. We use Veritas Netbackup and I have to say it is a dream. But it should be, we spent several hundred thousand dollars on our backup system. (You did ask how everyone else does it.) :slight_smile:

I'm not a linux expert, but in mainstream unix, cpio was the first program to be able to handle multiple volumes. At some point, tar picked this up also (I think it was a Posix mandate.) And the BSD backup/restore programs can handle multiple volumes. And OSF introduced pax which can handle multiple volumes. Since you're running linux, you may have some other options, I'm not sure. But if you want to handle multiple tape volumes, the tape drive must be opened by a program that can handle multiple volumes. dd cannot.

One option is to give up on multiple volumes. Figure out how much will fit on a tape and then run several jobs. Each job will write to a single volume. You will need to monitor this solution closely to make sure that each job always fits on its tape.

The other option that I see for you is to remote mount the fileserver's files onto the backupserver. I gather that you tried this and ran into permission problems. Although I have never used linux, I believe that the permission problem can be solved. Typically very special steps are needed on the fileserver to enable remote root access to remotely mounted files. If you detail the steps that you used to accomplish the remote mount, I'll bet that one of our linux experts can help you out with this.