Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jul 19, 2010 12:59 am 
Offline
Senior Newbie

Joined: Sat Jul 17, 2010 12:36 am
Posts: 6
I am having an issue while following http://library.linode.com/linode-manager/copy-disk-image-over-ssh to try and back up my linode to my local OSX machine.

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?


Top
   
 Post subject:
PostPosted: Mon Jul 19, 2010 9:42 am 
Offline
Senior Member

Joined: Sat Feb 14, 2009 1:32 am
Posts: 123
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/


Top
   
 Post subject:
PostPosted: Mon Jul 19, 2010 10:28 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
carmp3fan wrote:
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.


Top
   
 Post subject:
PostPosted: Mon Jul 19, 2010 10:44 am 
Offline
Senior Member

Joined: Sat Feb 14, 2009 1:32 am
Posts: 123
Guspaz wrote:
carmp3fan wrote:
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.


Top
   
 Post subject:
PostPosted: Mon Jul 19, 2010 7:34 pm 
Offline
Senior Newbie

Joined: Sat Jul 17, 2010 12:36 am
Posts: 6
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.


Top
   
 Post subject:
PostPosted: Tue Jul 20, 2010 4:20 am 
Offline
Senior Member

Joined: Sat Feb 14, 2009 1:32 am
Posts: 123
entrigan wrote:
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?


Top
   
 Post subject:
PostPosted: Tue Jul 20, 2010 4:23 pm 
Offline
Senior Member

Joined: Tue Feb 19, 2008 10:55 am
Posts: 164
entrigan wrote:
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.


Top
   
 Post subject:
PostPosted: Wed Jul 21, 2010 1:34 am 
Offline
Senior Newbie

Joined: Sat Jul 17, 2010 12:36 am
Posts: 6
So /Users/zstory does exist. I have previously been running these commands from a terminal on my linode (however I think it may not have been working because I do not know my local IP). So I tried Chesty's command

Quote:
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 :) Thanks!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group