- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:01 AM
02-04-2003 11:01 AM
#!/bin/sh
list=`cat /root/list` (just has / in the file)
backuplog=/var/tmp/backup.log
date=`date`
tar -cvf "$list" | ssh hostname dd of=/dev/rmt/0m
#end of script
Here is the result that is produced:
tar: Cowardly refusing to create an empty archive
Try `tar --help' for more information.
0+0 records in
0+0 records out
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:07 AM
02-04-2003 11:07 AM
Re: script help
For this to work without password prompting, you will have needed to exchange public keys(attached)
From the man page.
The file $HOME/.ssh/authorized_keys lists the public keys that are permitted for logging in.
There are a ton of options on the manpage that might be relavent in making this process work.
Don't give up and use rexec...
P
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:10 AM
02-04-2003 11:10 AM
Re: script help
create the tar file locally.
scp the file across(you will still need public keys)
then to the ssh command and only include the part you need to login and write the tape.
It makes the command line less complex and easier to debug
tar -cvf "$list"
scp tarfile remotlocation
ssh hostname dd of=/dev/rmt/0m
Just make the process on the other box something that writes the tar file straight to tape.
P
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:13 AM
02-04-2003 11:13 AM
Re: script help
http://hpux.cs.utah.edu/hppd/hpux/Gnu/tar-1.13.25/
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:18 AM
02-04-2003 11:18 AM
Re: script help
http://www.gnu.org/manual/tar/html_mono/tar.html#SEC123
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:25 AM
02-04-2003 11:25 AM
Re: script help
try this:
tar cvf - "$list" | ssh hostname dd of=/dev/rmt/0m
hope this helps
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:39 AM
02-04-2003 11:39 AM
Re: script help
/opt/tar/bin/tar -cv --file=hostname:/dev/rmt/0m "$list"
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:14 PM
02-04-2003 12:14 PM
Re: script help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 12:57 PM
02-04-2003 12:57 PM
Re: script help
How about pax?
pax -wXx ustar / | ssh user@host dd of=/dev/rmt/0m
Or cpio?
find / -xdev | cpio -o | ssh user@host dd of=/dev/rmt/0m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 06:07 AM
02-05-2003 06:07 AM
Solutiontar -cv / | ssh username@ip_address dd of=test.tar
or
tar -cv / | ssh username@ip_address dd of=/dev/rmt/0m
the above is interactive and will prompt you for a password unless you
have set up your ssh client to work without one
I would test this on a small directory and in a test environment before using
it in cron and in production environment.
ex:
tar -cv /test/blabla/ | ssh username@ip_address dd of=/whatever/test.tar
hope this helps
Jean-Pierre Huc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 07:24 AM
02-05-2003 07:24 AM
Re: script help
Darrell