balena-io / etcher

Flash OS images to SD cards & USB drives, safely and easily.
https://etcher.io/
Apache License 2.0
28.63k stars 2.04k forks source link

Implement a way to perform a backup from a drive #266

Open jviotti opened 8 years ago

jviotti commented 8 years ago

From https://github.com/resin-io/etcher/issues/265

This option would copy whatever there is on the device as a local *.img file, and will compress it as a ZIP archive, in a way that can be easily burnt back with Etcher.

Front logo Front conversations

jviotti commented 7 years ago

I just had some ideas for this: The problem at the moment is that blindly copying the device contents back means copying a lot of unnecessary data and having a backup image that equals the drive size. If you want to flash that back to a drive that is smaller, but in which the image logically fits, you'll have a hard time figuring out how to reduce appropriately.

As a solution, we can scan the partition table and only copy what is really necessary.

lurch commented 7 years ago

As a solution, we can scan the partition table and only copy what is really necessary.

I thought I'd already suggested that, but maybe I'd imagined it and it was something I was going to suggest, but forgot to :confused: Sounds good :+1:

jviotti commented 7 years ago

Haha, maybe it was on another related issue and it somehow got lost?

alexandrosm commented 7 years ago

@jviotti, reading this again, I think you're making your life difficult. We can start with a "dumb" imaging process, and improve on that later

lurch commented 7 years ago

Reading the partition table to determine how much of the disk to actually read, and simply outputting a smaller diskimage at the end of the process, isn't that complicated IMHO :-) It's only a small part of the process, so I'd see no reason to leave it out.

jviotti commented 7 years ago

@alexandrosm The thing is that copying back the whole thing could bring a lot of issues in the case of Etcher. Most users get away with it using something like dd, since dd will only copy what it can and discard the rest (so doing a backup of the whole thing causes no issues most of the time), however Etcher will complain in that case, which means users can only backup drives that they will re-flash to the same drive or a larger one.

Maybe I'm indeed overthinking it and that's not an usual scenario (maybe people only re-write the backups to the exact same drive most of the time), but if it is, Etcher would feel really awkward.

alexandrosm commented 7 years ago

All I'm saying is, let's do the part that's easy now, and solve the hard part later, if its an issue, rather than block the easy on the hard :)

--

Alexandros Marinos

Founder & CEO, Resin.io

+1 206-637-5498

@alexandrosm

On Wed, Dec 7, 2016 at 1:22 PM, Juan Cruz Viotti notifications@github.com wrote:

@alexandrosm https://github.com/alexandrosm The thing is that copying back the whole thing could bring a lot of issues in the case of Etcher. Most users get away with it using something like dd, since dd will only copy what it can and discard the rest (so doing a backup of the whole thing causes no issues most of the time), however Etcher will complain in that case, which means users can only backup drives that they will re-flash to the same drive or a larger one.

Maybe I'm indeed overthinking it and that's not an usual scenario (maybe people only re-write the backups to the exact same drive most of the time), but if it is, Etcher would feel really awkward.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/resin-io/etcher/issues/266#issuecomment-265445594, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLUCPCwHUcB-H7BSqJkpvPbde95FSO-ks5rFrMQgaJpZM4IDOFQ .

agsdot commented 7 years ago

Any updates/progress on this issue @jviotti?

blinkenlight commented 7 years ago

This would be pretty important for me too - I'd just be doing backups and restores (if needed = I screw up) on the same card anyway.

jviotti commented 7 years ago

Hey there,

We are sadly not making progress on this one now given that we're preparing some other major features for a new release. This is something we really want to support, so we'll definitely allocate some time for this soon.

That being said, if anyone is motivated enough to make this work, we welcome contributions to https://github.com/resin-io-modules/etcher-image-write, and then to integrate it with the UI (ping me on Gitter if you're interested and I can provide guidance to implement this)

archesys commented 7 years ago

Hi all,

I discover your application some days ago and find it very nice and useful, I work on Linux and a friend on Apple, so I also recommend this application to him.. We work on raspberry so we regularly need to backup and restore sdcard.. The backup function (in zip or tar.gz) would be very useful. no more news on that ? I'm french so if you want me to translate interface in french, I could help you (I don't have so much time but If it's not too big work it may be affordable.

Eric..

fzymek commented 7 years ago

+1 for this feature from me as well, very useful for raspberry

tomatac commented 7 years ago

This is an essential feature. Currently, what is the recommended way to create an image?

jviotti commented 7 years ago

@tomatac You can use dd to copy the device data to a file.

incyi commented 7 years ago

+1

AWatk commented 6 years ago

+1

A backup feature would greatly ease my workflow

adrianmihalko commented 6 years ago

Still no backup feature?

edsonpatricio commented 6 years ago

+1

dominikkv commented 6 years ago

+1 Would be great!

philomatic commented 6 years ago

Do this!

+1

onkelandy commented 6 years ago

Alternative way is to use Apple Disk Utility.. But having a simple way to create an image with only the necessary size would be aaaaawwwwesome! +1

borpin commented 6 years ago

+1 Would be fantastic to have this and not have to go back to dd 👍

cgpena commented 6 years ago

+1

jarrah31 commented 6 years ago

21 months since the original request - I guess this feature isn't going to be implemented?

lurch commented 6 years ago

@jarrah31 This is still on the TODO list (and in fact #1671 was a big step towards making this backup feature possible), we've just had lots of other more important features to concentrate on.

adammhaile commented 6 years ago

+1

xristocodos commented 6 years ago

So even though most people aren't writing the image back to the exact same drive (usb id), they are most certainly moving it to the same SIZE of drive or greater. Just make a disclaimer and fade out the Begin! button (or whatever) if it doesn't detect an adequate size. Cramming images into smaller drives is a dicey tricky artform that I personally don't believe anyone expects Etcher to perform. I'd just put a disclaimer saying that 0.) this feature is somewhat experimental, 1.) the drive must be equal or larger capacity, and 2.) if it is bigger, it will "appear as" the size of the image, until its reformatted at some point.

If someone needs to copy an 8gb uSD stat and all they have is a 16gb usb stick, chances are they're not really concerned about the extra space, they probably just need the image duped asap due to lack of time or availability (prompting the backup/copy in the first place).

sunapi386 commented 6 years ago

Do we have an ETA on this?

lurch commented 6 years ago

This is a feature we'll need for https://etcher.io/pro so it'll probably get added sooner rather than later ;-)

KerstinMaur commented 6 years ago

Etcher Pro and this feature are awesome! 😍 Looking forward to them! 🧐

t3spe commented 6 years ago

+1

Any update on this? Thanks

jhermsmeier commented 6 years ago

Sure, the technical foundation is pretty much there, and the user interface part is being worked on soon, and this will most likely end up in the next release :)

MDM63 commented 5 years ago

Is this going to be a feature for Etcher or only for Etcher pro?

jhermsmeier commented 5 years ago

@MDM63 This is going to be available in both Etcher & Etcher Pro; generally both of them will maintain feature parity in regards to the writing process.

cjcharles0 commented 5 years ago

I dont want to appear ungrateful as I definitely am(!!!!!), but is there an ETA on this yet? Such a useful feature for me (even if it doesnt scan the partition table to avoid copying blank space)

TommySharpNZ commented 5 years ago

+1 for this feature too please!

kriekprinsloo commented 5 years ago

+1 I also think that this would be great.

On Fri, Sep 14, 2018 at 2:14 PM, TommySharpNZ notifications@github.com wrote:

+1 for this feature too please!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/resin-io/etcher/issues/266#issuecomment-421486163, or mute the thread https://github.com/notifications/unsubscribe-auth/ADpgDhsDD1t2mKnLJ8NsmPlSyf4WOfHvks5ubBxBgaJpZM4IDOFQ .

Orrison commented 5 years ago

+1 for this! Can't wait, thank you folks for all you do!

nemeth-it commented 5 years ago

+1

richardhughes260 commented 5 years ago

Is there an ETA on the backup feature?

ddomit commented 5 years ago

+1 Any news?

dhowe commented 5 years ago

progress?

ghost commented 5 years ago

hows this coming along?

boelle commented 5 years ago

yep... seems a shame that we can create an image from the sd card :-(

Poincare1 commented 5 years ago

Any progress in being able to create an image from flash media? Seems it was reported more than a year ago it would be an upcoming feature.

sunapi386 commented 5 years ago

Clonezilla is a capable alternative, if you don't mind rebooting booting from USB and waiting. It's not bad if you dedicate a Raspberry Pi to do it. https://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/01_Save_disk_image

Clonezilla source code and see example bash scripts for cloning in "samples" folder. https://gitlab.com/stevenshiau/clonezilla.git

timonsku commented 5 years ago

@jhermsmeier is this feature put on the backlog for now? It sounded like it was close to release a year ago.

jhermsmeier commented 5 years ago

@PTS93 I don't know, I'm not working on Etcher anymore, but maybe @thundron or @zvin can answer that question

paddywwoof commented 4 years ago

Any news? @thundron @zvin

thundron commented 4 years ago

@paddywwoof Working on it, but it will still need a bit more before it's pushed and merged, it requires some changes in the UI flows too