Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
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/
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 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.
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 :-)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.