dump && restore via FTP

Hello, everybody!

Can somebody help with restore via ftp, plz?

So, I have backup-server. Access to it - only via FTP. I have dump file there. With this file everything OK - I can watch files in it etc.

Than, I make newfs on machine, mount it to /mnt and:
Code:
# restore rf | ftp ftp://user@backup.something.com/file.dump -

After download progress endinding - I don't have anything on my partition:

Code:
...
5656135680 bytes received in 14:58 (6.00 MB/s)
221-Goodbye. You uploaded 0 and downloaded 5523570 kbytes.
221 Logout.
frenzy:/mnt@[12] # ls
/bin/ls: Input/outpu erro.
frenzy:/mnt@[12] # df -h
Segmentation fault.
frenzy:/mnt@[12] # cd /
frenzy:/@[12] # file -s /dev/da
da0%   da0p1% da0p2% da0p3%
frenzy:/@[12] # file -s /dev/da0p2
Segmentation fault.

Any ideas - what I do wrong?

P.S. sorry for my English :-)
 
To have restore(8) read from stdin, the file has to be piped to it.

(Untested.)
Code:
# ftp ftp://user@backup.something.com/file.dump -o - | restore -rf -

The segmentation faults are worrying. Unless those were caused by the failed restore, that needs to be fixed first.
Also, please, please stop using FTP. sftp(1) is an easy replacement. So are many other things that are less prone to compromise.
 
I don't think that sftp(1) has an option to dump the file to stdout. The standard ssh(1) client is better suited for that


# ssh user@remote dd if=/somedumpfile | restore -rf -


Edit:

If you must use FTP, use fetch(1). It knows the FTP protocol and is generally more robust than the standard ftp(1) client.

# fetch -o - [url]ftp://user@backup.something.com/file.dump[/url] | restore -rf -
 
Back
Top