*nix Thread, Copying files via SSH in Technical; Hi Guys,
I have a Drobo FS that has gone belly up and after 3 weeks of emailing drobo's tech ...
30th March 2013, 01:19 AM #1
- Rep Power
Copying files via SSH
I have a Drobo FS that has gone belly up and after 3 weeks of emailing drobo's tech support I've finally got access to my files via SSH.
I started copying them off the drobo onto a new drive with WinSCP but found this too unreliable so have started using PSCP.exe with the following .BAT file
Only problem is this does stop/freeze every few hours (not as much as WinSCP) but when you start running the bat file again it copies everything from the beginning. Does anyone know of a way of removing files from the Drobo once they have been copied off so when it starts again it doesn't copy everything again? Others forums have mentioned using rsync but this looks a little beyond me - any advice out there?
E:\pscp.exe -pw root -scp -r -unsafe -batch firstname.lastname@example.org:/mnt/DroboFS/Shares/DATA/* E:\DroboCopy\Data\
IDG Tech News
30th March 2013, 01:32 AM #2
Could you tar them up then just transfer the tar?
3rd April 2013, 11:17 AM #3
- Rep Power
Cheers for that, is there any way to ignore input/output messages or continue on error as when I'm taring files it is stopping at 10% due to error messages?
3rd April 2013, 11:29 AM #4
what errors are they? if it is permissions just blast them with chmod .
according to "man tar" -i will ignore directory checksum errors... maybe enough, try tar cvfi file.tar /path/to/files
Last edited by markwilfan; 3rd April 2013 at 11:29 AM.
Reason: switch was wrong
3rd April 2013, 11:41 AM #5
If you have input/output errors your disks may well be hosed.
you want rsync in any case - it's not difficult to use, and serverside needs no more setup than you have right now.
3rd April 2013, 02:38 PM #6
- Rep Power
tar: read error: Input/output error
Originally Posted by markwilfan
And just tried with cvfi and still got stuck after a few mins, will look into rsync a bit more and see what I can work out...
Thanks for your help so far!
3rd April 2013, 02:53 PM #7
That's *really* looking like dead disks. A file-by-file copy like rsync is your best option (other than mounting the drive in a PC), then replace those drives.
4th April 2013, 04:45 PM #8
i would be tempted to try the disks in another machine, i agree the disks probably are fubar or getting there.
i've had real success with
TestDisk - CGSecurity
before, i think its included on the main rescue iso's/
4th April 2013, 06:22 PM #9
I found this to be a nice little Windows Rsync client -http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
Deltacopy is easy to use and will mean you aren't starting again everytime.
10th April 2013, 01:44 AM #10
If the problem is I/O errors, you could try copying block by block with dd (disk duplicate). Using the options noerror,notrunc, it should give you garbage blocks in the output rather than stopping. This should copy all good blocks, I hope.
ssh server "dd if=/dev/sda conv=noerror,notrunc " | cat > somebackup disc or file
should be helpful. see https://wiki.archlinux.org/index.php/Disk_Cloning
SSH is the next best thing to being there. dd can work on one partition or a whole disc. It's wonderful.
10th April 2013, 09:48 PM #11
You might try NFS. You could mount it on another computer, or mount another computer on it. The other computer could be Windows, you just have to google for instructions on installing MS's NFS support (which works well). Then you could ssh in and use mv, or use a good tool on the destination computer; if Windows I would recommend Karen's Replicator which, while old, is fast and effective, won't waste time copying files that are already there, won't prompt you and wait when there's an error, just keeps a log of what went wrong and continues copying.
You could also use SSHFS.
SSHFS - Wikipedia, the free encyclopedia
However, if WinSCP is almost doing the job, maybe it's worth another try - but use Move instead of Copy? That will eliminate the issue of going back for more. It also has Synchronize and Compare Directories commands that may be helpful. Are you using SCP or SFTP protocol? Could try switching. Make sure "Continue on error" is enabled as well as both "Automatically reconnect session" options, and tweak the "Maximal number of transfers at the same time". For large files you'll want to make sure resume is enabled. Get what's easy to get, make note of what doesn't transfer, then go back and use ssh+NFS with dd or cp (depending on just how bad it is).
One more idea: Can the Drobo mount a USB drive or even an extra internal SATA drive? If so, you could do all your rescue locally, just using ssh to log in and execute the commands.
Last Post: 27th April 2007, 07:30 PM
By Dos_Box in forum Learning Network Manager
Last Post: 12th April 2007, 11:42 AM
By contink in forum Scripts
Last Post: 25th December 2006, 10:15 PM
By Frazer in forum Scripts
Last Post: 20th June 2006, 04:53 PM
By browolf in forum Scripts
Last Post: 28th November 2005, 11:28 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread