LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-01-2010, 06:16 PM   #1
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 997
Blog Entries: 15

Rep: Reputation: 136Reputation: 136
backup to qcow2 (or anything VM compatible) using dd (anything)


Hi, my laptop has a cracked screen and is going to ship for repairs. I'd like to backup the data I have oon it.I'm thinking "tar -cpjf" would do the trick, but a crazy thought entered my mind : backup the entire system to a virtual disk (with a format like qcow2) and then be able to run it from a VM (like qemu). is that even possible?
I mean, backing up your system so that it is vm-ready would be really cool. assuming sda5=root
Code:
dd if=/dev/sda5 of=~/root.qcow2
or would that just create a file the size of the partition? would it run anyway?

The optimal shipping time is less than 24 hours away, so a quick answer would really be appreciated.

Serafean
 
Old 07-01-2010, 07:14 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
'dd if=/dev/sda of=/path/to/humongous/storage/disk.dd; qemu-img convert -c -f raw -O qcow2 /path/to/humongous/storage/disk.dd /path/to/humongous/storage/disk.qcow2;'?
 
Old 07-01-2010, 07:38 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,008

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I don't even convert them when I use qemu. I just dd the disk and use it as hda. I don't rename the file though. It really isn't a qcow2 file just by dding it.
 
Old 07-02-2010, 02:39 AM   #4
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 997

Original Poster
Blog Entries: 15

Rep: Reputation: 136Reputation: 136
Quote:
It really isn't a qcow2 file just by dding it.
So a qcow2 file can only be written to from a VM? noted.
Thanks UnSpawn, personnally I'd replace the first ; with &&. Just seems more failure-safe.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Best inexpensive linux compatible gamepad or Best pcsx* compatible gamepad? indubitableness Linux - Hardware 6 09-27-2009 06:49 AM
Newbie trying to write a simple backup script to backup a single folder Nd for school stryker759a Linux - Newbie 2 09-16-2009 08:52 AM
Need Display driver package for Xvesa compatible/not Xorg compatible on multiple Dist Ziggurat6 Linux - Newbie 1 06-16-2009 11:55 PM
hot can make a text browser compatible mior of a sit that isnt normally compatible markyg852 Programming 2 04-14-2009 09:22 AM
Assembler Compatible Not Binary Compatible, Linux btbx Programming 1 09-22-2007 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration