wotan1953
asked on
tar procedure may have been compamised
The cord on my laptop, got pulled out during the night (the cat :-(() and I am not sure if the tar file procedure finished or not. Other than restarting or completely untarring, is there a way I can ascertain whether this procedure completed?
Here is what I was using from OmarFarid:
omarfarid:
from your laptop:
ssh username@remoteserver "tar cf - /path/to/dir" | dd of=/path/to/local/dir/myba ckup.tar
Thanks in advance.
Here is what I was using from OmarFarid:
omarfarid:
from your laptop:
ssh username@remoteserver "tar cf - /path/to/dir" | dd of=/path/to/local/dir/myba
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am very sorry, it should have been tar -tvf -
ASKER
And I am adding another ... third times a charm :-))
Here is my run :
Title: Multiple ssh hops to tar to MAC laptop.
Question:
Hi-
I need to ssh into server X and then ssh into server Y and tar up a dir (files and dirs), to my MAC laptop. I previously got this from OmarFarid:
ssh username@remoteserver "tar cf - /path/to/dir" | dd of=/path/to/local/dir/myba ckup.tar.
I am thinking something like:
ssh username@remoteserver1 | ssh username@remoteserver2 "tar cf - /path/to/dir" | dd of=/path/to/local/dir/myba ckup.tar
But not sure. Any help will be appreciated. If by some strange web of circumstances I am right, then the confirmation is still worth 500 pts. I am under the gun on this latest project, and I appreciated you folks help.
Thanks -
Here is my run :
Title: Multiple ssh hops to tar to MAC laptop.
Question:
Hi-
I need to ssh into server X and then ssh into server Y and tar up a dir (files and dirs), to my MAC laptop. I previously got this from OmarFarid:
ssh username@remoteserver "tar cf - /path/to/dir" | dd of=/path/to/local/dir/myba
I am thinking something like:
ssh username@remoteserver1 | ssh username@remoteserver2 "tar cf - /path/to/dir" | dd of=/path/to/local/dir/myba
But not sure. Any help will be appreciated. If by some strange web of circumstances I am right, then the confirmation is still worth 500 pts. I am under the gun on this latest project, and I appreciated you folks help.
Thanks -
ssh user@serverA "ssh user@serverB tar -cf - /path/to/dir" | dd of=/path/to/local/dir/myba
ASKER
Thanks ... quick followup on the this question "tar procedure may have been compamised", when U said run du -ks /path/to/dir, and compare the 2. I have had this come up again. They changed the network during th night , and I think another one of these, might have failed. When I run this du etc .. I get.
For the dir I was trying to tar:
username@remoteserver > du -ks rw/
870984 rw
username@remoteserver >
For the tarred file itself:
bash-3.2$ du -ks rw_sav_dir/
861640 solveint/
bash-3.2$
I guess my question is, "should these be exactly the same or close?"
When I run:
dd if=/path/to/local/dir/myba ckup.tar | tar xvf -
there are no errors, but determining that all files/dirs are there is difficult, because the file structure is huge.
Any help will be appreciated.
For the dir I was trying to tar:
username@remoteserver > du -ks rw/
870984 rw
username@remoteserver >
For the tarred file itself:
bash-3.2$ du -ks rw_sav_dir/
861640 solveint/
bash-3.2$
I guess my question is, "should these be exactly the same or close?"
When I run:
dd if=/path/to/local/dir/myba
there are no errors, but determining that all files/dirs are there is difficult, because the file structure is huge.
Any help will be appreciated.
the results of both are in KB. The difference is 870984 - 861640 = 9344 KB which is about 9 MB which I think much. It could be that the tar did not complete successfully.
dd if=/path/to/local/dir/myba ckup.tar | tar xvf -
results in restoring it to the local system and there you could do du -k again and compare the two results which could be close to each other or an exact match
dd if=/path/to/local/dir/myba
results in restoring it to the local system and there you could do du -k again and compare the two results which could be close to each other or an exact match
ASKER