This question already has an answer here:

I am currently 200 miles away from Raspberry Pi at home and I have just bought the new Raspberry Pi to join my other one.

I am wondering if I could possibly Clone the SD card through RP 1 (the one at home) and then ftp it to my laptop and then clone it to my new sd card (which I will then send home) using Win32DiskImager for the RP2 (arriving at my home tomorrow).

The idea for this is that my mum at home can just connect the cables and insert the SD card which I have taught her how to do.

Also say if I just took out the memory card of my old pi (RP1) and inserted it into the new one (RP2) would it actually work as the RP1 does (including ssh connection)

marked as duplicate by goldilocks Feb 2 '15 at 23:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Why not just start from scratch? Setup a new OS and just get whatever personal files & config you need. – Ghanima Feb 2 '15 at 21:55
  • @goldilocks This does not answer the question as asked. I think your contribution is worthwhile, and the OP may want to read, but it does not work (at least for all systems). There are additional provisos; the target needs to have similar users and permissions. I tried this (some time ago) to OSX and the "backup" loses user/permission information, so it is NOT a clone. It would probably work to an attached disk. – Milliways Feb 3 '15 at 0:34
  • @Milliways I didn't close this as a dupe because I have an answer to the other question (which may or may not be the ideal solution) but because the question is more or less the same; Maximilian is wanting to 1) Create a copy of a running system, then 2) Transfer it somewhere over a network so it can be reproduced and used elsewhere. If you can make a backup ala #1, then implicitly you should be able to use it ala #2. I agree there may be some provisos related to particular methodologies, but it's essentially still the same question, or else a series of questions including that one... – goldilocks Feb 3 '15 at 3:26
  • ...namely, "I want to create a copy of my SD card", then, "I want to transfer it via a network", then, "I want to create and SD card image on my windows computer" -- all of which have been answered many times before. It is much simpler to break tasks such as this down into relevant constituent parts rather than expecting people to reply ad nauseum to infinite variations on, "I have a red/blue/green V8/V6/flat-4 sedan/coupe/fastback in Texas/Argentina/France and..." – goldilocks Feb 3 '15 at 3:28
up vote 0 down vote accepted

If you are setup to establish an ssh connection from RP1 to your notebook, N, you may be able to copy the disk right to N by disk dumping through this connection.

dd if=/dev/sda | ssh me@mydomain.com "dd of=/path_for_backup/RP2.iso"

Of course this approach has a lot of prerequisites, but if you already have easy ssh between you machines, it might be worth a try.

Following the comment from Maximilian, I realized that my solution as written assumes that N is a *nix machine. This solution is OK for Linux machines (and perhaps Macs as well). For Windows one would have to have an equivalent to dd. I've not done this sort of work with Windows, so I can't say how that would be done. I apologise for that limitation to my answer.

  • is it /dev/sda or dev/root ? also is the path_for_backup directory on N? – maxisme Feb 2 '15 at 22:21
  • I believe that it is /dev/sda if you are cloning the entire drive, which is what you want to do as I understand it. Yes the path is on the notebook. Forgive me, I'm Linux centric and assumed that the notebook was running Linux. On windows things will be different, and I can't tell you what ssh should be piping to on that end. Sorry about that. – Mike Satteson Feb 2 '15 at 22:34
  • Thank you! How can I be 100% sure it is /dev/sda? I need it to work flawlessly with Win32DiskImager when restoring the sd! – maxisme Feb 3 '15 at 10:35

You could do a fresh install of the OS for your new Pi, then use (S)FTP to copy over all configs and user files from the old Pi to the new Pi. As for creating an image of the old Pi remotely - I'm not sure.

Yes, you can use the same SD card from RP1 and use it on RP2. The second Pi will have the exact same configurations as the first one (including SSH connection). The only time you might run into problems is if you're using a really old image for Pi 1 and Pi 2 requires newer firmware or if you purchased any codec licenses.

Not the answer you're looking for? Browse other questions tagged or ask your own question.