LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-15-2008, 12:56 PM   #1
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Rep: Reputation: 23
Problem: tar Backup to Remote Tape Drive


I want to use tar to back up one box that is connected wirelessly to a second one equipped with a DAT drive. I need to be root to do the full backup, because only root can read some directories.

I have been unsuccessful in using tar's built-in 'rsh' facility, because rsh will not accept root connections. I can do a root login with ssh, but the command:

tar --rsh-command=ssh --file=localnetwork.net:/dev/nst0 -cv /

fails.

I could just use NFS to mount the whole fs, but I still think there's a way to do it remotely with tar.

Insights

HaroldWho
 
Old 07-15-2008, 01:36 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 25,269

Rep: Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522
Quote:
Originally Posted by HaroldWho View Post
I want to use tar to back up one box that is connected wirelessly to a second one equipped with a DAT drive. I need to be root to do the full backup, because only root can read some directories.

I have been unsuccessful in using tar's built-in 'rsh' facility, because rsh will not accept root connections. I can do a root login with ssh, but the command:

tar --rsh-command=ssh --file=localnetwork.net:/dev/nst0 -cv /

fails.

I could just use NFS to mount the whole fs, but I still think there's a way to do it remotely with tar.
Never tried to do this, but a lowball way might be to tar everything up, and ship that file over to the other machine, where you write it to tape.

You might also want to try:

tar -cv / | scp <userid>@<remote machine address>:/dev/nst0

Which may prompt you for a password, then use SCP to 'copy' the data to the destination (in this case, the tape drive).

Might work..as I said, just an idea. Never tried it.
 
Old 07-15-2008, 02:58 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299
This program may be able to help:
http://www.maier-komor.de/mbuffer.html

Code:
       Making a backup via network:

       tape server: mbuffer -I 8000 -f -o $TAPE

       backup client: tar zcf - /home | mbuffer -O tapeserver:8000
And if you use the right options it will prevent extra wear on the tape motors.
 
Old 07-16-2008, 09:30 AM   #4
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
I have done backups to a drive on another server. The method works well, is secure, and would transfer to what you want. I used ufsdump and dd. You could use tar and dd. Details posted in this thread: http://www.linuxquestions.org/questi...loader-655067/
 
Old 07-16-2008, 02:37 PM   #5
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 23
Thanks to you all. I will certainly follow up on the 'scp' suggestion, even I can understand it :-)

The 'code' quote in the 'mbuffer' suggestion is a little too cryptic for me, but I d/l'd mbuffer and will read further.

I did enable an NFS mount of the box to be backed up, and just backed up the mounted fs on the tape locally. Works fine, but there's some speed penalty for the network fs access. OTOH, I havent experimented with NFS server options yet.

Thanks again,

HW
 
Old 07-16-2008, 03:27 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 25,269

Rep: Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522Reputation: 7522
Quote:
Originally Posted by HaroldWho View Post
Thanks to you all. I will certainly follow up on the 'scp' suggestion, even I can understand it :-)

The 'code' quote in the 'mbuffer' suggestion is a little too cryptic for me, but I d/l'd mbuffer and will read further.

I did enable an NFS mount of the box to be backed up, and just backed up the mounted fs on the tape locally. Works fine, but there's some speed penalty for the network fs access. OTOH, I havent experimented with NFS server options yet.

Thanks again,

HW
Well, I'd go with the mbuffer (never knew that existed, but would have suggested it had I did...good call) program. SCP is a bit clunky for what you want to do...very lowball, and may not even work.
 
Old 07-17-2008, 01:20 PM   #7
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 23
Further to the suggestions:

As far as I can tell, 'scp' doesn't accept input on STDIN.

Having untarred and compiled 'mbuffer' and RTFM, that looks like what I need (and I never heard of it before either). Haven't tested it yet, but hope springs eternal :-)

Thanks again,

HW
 
Old 07-17-2008, 02:13 PM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299
I haven't ever heard of mbuffer either, but I found it a few days ago while searching for something else entirely, dunno if it will do what you want, but it might.
 
Old 07-30-2008, 12:05 PM   #9
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 23
Final Word: 'tar' Backup to Remote Tape Drive

I did a little evaluation of 'mbuffer' as suggested. It works, it's neat, it's even reasonably fast (after a few tweaks to buffer size and the tape block size). It still leaves one issue unaddressed: how to run a 'verify' (tar -d) on the finished tape.

So, I'm using NFS to mount the filesystem tree r/o on the box with the tape drive, and backing up the entire mount. Maybe a little slower (ca 480 kB/s, vs ca 500 with mbuffer), but running 'verify' is a no-brainer, and a script automates the whole thing to be unattended.

Again, sincere thanks to everyone who contributed.

HaroldWho
 
  


Reply


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
help me to take backup to tape drive using tar binuveranal Linux - Server 1 02-26-2008 03:33 AM
Tar not able to perform backup on tape drive livetoday Red Hat 2 09-29-2007 03:16 AM
Appending to a tar tape backup sonici-aus Linux - Newbie 3 07-11-2007 01:45 AM
tar backup maximum 2gb only per tape tsaravan Linux - General 6 09-20-2006 06:45 AM
Using a DDS5 tape drive to restore from a DDS3 backup tape. AndrewCAtWayofthebit Linux - Hardware 1 05-14-2006 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:22 PM.

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