Would this work or would I have problems:

Using dd command to backup an entire SSD containing dual boot Windows/Ubuntu partitions into an .iso file, with the intent to then dd that iso back onto the same size SSD in the case of a drive failure?

3 points

Like everyone has said there’s way better ways of doing it.

HOWEVER if you wanted to use dd you totally could. I’d recommend piping into something like gzip/zstd to save some space though.

dd if=/dev/sda | gzip >/mnt/backup_disk/sda.gz

You could also use restic backup the raw block device too.

That being said, clonezilla is exactly what you want

permalink
report
reply
2 points

It would technically work, yes.

But also, you’re wasting a lot of storage space that way, especially if you do it often. You really only should backup your home directory, it contains all your data. You can simply re-install the rest from the internet.

permalink
report
reply
3 points

you can even mount the image as a loop device (i suggest read only (ro)) to extract files

permalink
report
reply
6 points
*

Many years ago I tried it, but didn’t really read up on it. Wanted to back up my Pi’s sdcard while the system was running. I even fucking named that script “online-backup”.

Now every time I ran that, after hours, I noticed my Pi was crashing, and never booted back up. I used chinese sd cards so I blamed it on them.

But this happened multiple times, just to learn I was using dd absolutely wrong.

dd was always a scary utility to me, and still is. I fucked up things with dd, regardless I quadruple checked everything 😅

but to answer the question; it’s possible, but you really need to know what are you doing.

permalink
report
reply
7 points

Don’t do this. If you have a 1TB drive with only 10GB being occupied, your image will be 1TB, and you will need a >1TB drive to store it, and another to restore it.

If you only backup the data you could do it in a much smaller size drive and it will be a lot faster to perform backups (otherwise you will need hours every time you want to create a new image).

permalink
report
reply
1 point
Deleted by creator
permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.7K

    Monthly active users

  • 6.5K

    Posts

  • 179K

    Comments