Backing up over ssh with dd
after setting everything up per the instructions I run
ssh -C root@(myip) "dd if=/dev/xvdb" | dd of=/Users/zstory/linode.img
and the terminal responds "dd: opening '/Users/zstory/linode.imng': no such file or directory"
Has anyone seen this before? any ideas?
7 Replies
dd if=/dev/xvdb | ssh -C root@(myip) "dd of=/Users/zstory/linode.img"
I would also recommend using dcfldd. It is a version of dd modified for Department of Defense Computer Forensics Lab. It will give you a progress update and will let you compute MD5/SHA1 hashes when the file as the data is being pulled off the drive. Comes in very hand when you want to verify your backup on the receiving end. Its free and available from
@carmp3fan:
I believe what you want is:
dd if=/dev/xvdb | ssh -C root@(myip) "dd of=/Users/zstory/linode.img"
I would also recommend using dcfldd. It is a version of dd modified for Department of Defense Computer Forensics Lab. It will give you a progress update and will let you compute MD5/SHA1 hashes when the file as the data is being pulled off the drive. Comes in very hand when you want to verify your backup on the receiving end. Its free and available from
http://dcfldd.sourceforge.net/
Progress reports can already be achieved by replacing dd with pv for the first stage, and MD5 sums can be achieved using tee, a named pipe, and md5sum. However, it should be pointed out that dcfldd is in the Ubuntu repository (and I assume others), and so if anybody wants to use it, they should get it from their distro's repo and not sourceforge.
@Guspaz:
@carmp3fan:I believe what you want is:
dd if=/dev/xvdb | ssh -C root@(myip) "dd of=/Users/zstory/linode.img"
I would also recommend using dcfldd. It is a version of dd modified for Department of Defense Computer Forensics Lab. It will give you a progress update and will let you compute MD5/SHA1 hashes when the file as the data is being pulled off the drive. Comes in very hand when you want to verify your backup on the receiving end. Its free and available from
http://dcfldd.sourceforge.net/ Progress reports can already be achieved by replacing dd with pv for the first stage, and MD5 sums can be achieved using tee, a named pipe, and md5sum. However, it should be pointed out that dcfldd is in the Ubuntu repository (and I assume others), and so if anybody wants to use it, they should get it from their distro's repo and not sourceforge.
True. I simply prefer to use dcfldd because I have a security and forensics background and I don't like having to pipe and tee too much. Just my preference.
dcfldd is not in the Fedora repo but a replacement, dc3dd, is. I have not used it.
I am entering this command on the linode, do I need to somehow authenticate with my local machine?
Thanks for the dcfldd hint. I will use that in the future.
@entrigan:
I tried that modified command, but I got the same issue: "No such file or directory".
I am entering this command on the linode, do I need to somehow authenticate with my local machine?
Thanks for the dcfldd hint. I will use that in the future.
Are you sure /Users/zstory/ exists?
@entrigan:
I tried that modified command, but I got the same issue: "No such file or directory".
I am entering this command on the linode, do I need to somehow authenticate with my local machine?
Thanks for the dcfldd hint. I will use that in the future.
enter
ssh -C root@(mylinodeip) "dd if=/dev/xvdb" | dd of=/Users/zstory/linode.img
on your desktop
I would rdiff-backup or rsync to back up though, you can run them daily and after the first run it will only cost a few megs in bandwidth, the dd one will take gigs everytime.
also, if you have a database, you should dump it daily.
> ssh -C root@(mylinodeip) "dd if=/dev/xvdb" | dd of=/Users/zstory/linode.img
run from my local machine, and it replied "ssh: connect to host (my linode ip) port 22: Connection refused"
I am clearly doing something very basic wrong, maybe I will buy the linode backup service for now, and return to this issue when I know more