If you just want to try to do it yourself, the examples on docs.sun.com (in the System Administrators Collection for Solaris) depend on rsh and .rhosts. Those are generally regarded as not being secure. I would do it through an ssh pipe. I have a rather extensive script that does the same fssnap snapshot with ufsdump and can do it to a remote drive over ssh. I recently posted it so that people could look at it for reference. Minimalist SysAdmin Tape backup script for Solaris 9 or 10. You're welcome to look at it for reference and/or use it directly. However, it sounds like your situation may be better served by using Amanda.
You can use rsh or ssh. For example:
ssh remote_server ufsdump /path/to/fs
syntax and conceptualization of that is all wrong.
If you want to ssh to the remote server and then execute something there, then you need quotes around the "something." e.g.
ssh remote_server "ufsdump /path/to/fs"
But, the OP wants to run ufsdump and send that output to the remote_server to be stored there. Presumably, he wants to automate that. Also, ufsdump has other options that need to be dealt with. So, things get noticeably more complicated.
ufsdump needs to be run as root. You want automatic login with ssh certs, but you don't want to do that as root. So, set up a backup user, and setup ssh certs for the backup user (see OpenSSH Public Key Authentication for guidance.) Then run some variation of the following, adapted to your system and needs:
That generates the data stream from ufsdump, pipes it through ssh, and uses dd on the opposite end to put it to a tape drive. It happens to be embedded in a larger script, and is using an fssnap snapshot to do the dump. It also captures the return status of the ufsdump so that a script can take action based on the success or failure, or at least report it. That introduced a bit of complication, because that has to be paired with the ufsdump as a subprocess, and you can't pass environment variables back out from a subprocess -- thus, the code file to get the status code back out.
Anyway, I've already given the reference/link to the full script.
I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code
TARFILE=${NAME}.tar
TARGZFILE=${NAME}.tar.gz
ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Hello Every one!!
I am trying to write a shell script which will connect to a remote server and execute scripts which are at a certain path in the remote server.
Before this I am using a sudo command to change the user.
The place where I am stuck is, I am able to connect to the... (6 Replies)
hi all,
i am refreshing my hardware, but i do not want to do a clean installation/reinstallation.
I am wondering if i could do
- do a ufsdump of the / partition (into a file on a nfs share)
- bootup using cdrom in the new machine
- mount the boot device/slice, and restore the ufsdump on... (7 Replies)
Hi guys
i tried to restore a server from a ufsdump. For your information, the ufsdump was created on a v440 and i have to restore it to a v240... is it supported? should it work? don't know but i try!
the problem is after restoring the filesystem, modify the vfstab, system file and install... (5 Replies)
Hi guys
I have a little problem. I need to identify the server type from some ufsdumps.
How can i do that?
I grepped with:
grep Sun messages*
but with this command, if there server was never rebooted, i cannot recognize the server type.
any other idea?
thx in advance
Ivan (5 Replies)
People i have 2 sun sparc solaris 10.
I have one filesystem to 98% and i need to do a ufsdump of that filesystem.
THe problem is that i don't have space to allocate the dump of the filesystem.
Thats why i want to do it from the other sun and bring the ufs dump to de /FREE filesystem.
... (4 Replies)
Hi Unix members.
I am trying to make a backup to remote mounted filesystems :
fileraseing:/vol/oracliente_revap01
10G 1.3G 8.7G 13% /orarev_ap01
fileraseing:/vol/bobje
10G 5.9G 4.1G 60% /bobje
But I am receiving the follow message when use the ufsdump command:
:$PWD>ufsdump 0fu... (8 Replies)
Hi Guys,
Marry X-MAX in advance :)
I would like to build a new server using ufsdump/ufsrestore. Both the servers are identical hardware and model. I am using Solaris 10 X86 O/S.
I am having ufsdump "mydump.rootdump.gz" in a Central NFS server.
What I did:-
I took backup of root... (1 Reply)
Hi Guys,
Marry X-MAX in advance :)
I would like to build a new server using ufsdump/ufsrestore. Both the servers are identical hardware and model. I am using Solaris 10 X86 O/S.
I am having ufsdump "mydump.rootdump.gz" in a Central NFS server.
What I did:-
I took backup of root... (1 Reply)
Hi,
I have two solaris 9 boxes:
SunOS bmsapp01 5.9 Generic_118558-06 sun4u sparc SUNW,Sun-Fire-V440
and
SunOS bmsdb01 5.9 Generic_118558-06 sun4u sparc SUNW,Sun-Fire-V440.
The bmsapp01 server has a SDLT tape drive attached to it. I am trying to perform a remote ufsdump to the tape drive on... (5 Replies)