Assist with backup (drive) information- can someone point me in the right direction?

Recently, I lost my main drive on my opensuse TW system. I never really considered backing up the OS itself, just the data.

But after waiting 2 days for a drive, then re-installing and re tweaking (over a few more days) and honestly forgetting more than I remembered to reinstall and configure (until I went to use it)- I though maybe I should backup the OS drive.
So as I configure the system, I would like to backup drive (image) of the OS drive (its a 1tb) to another larger drive (internal- not external). So if a fail occurs, a new drive can be re written from the image in minutes from the last image, and be mostly up to date.

Reading on DD appears this feasible with DD. assume OS is sda and larger backup drive is sdc (installed in the case- not external)-

# dd if=/dev/sda of=dev/sdc/OSbackup/latestbackup.img

Questions:
If I use a boot CD and rewrite the OS from SDC to a new installed sda would this work (at least in theory- maybe I botch something on the execution)?
Are there hidden files I need to worry about (or does dd handle that)? Pitfalls?

Thanks in advance. & Apologies for the long windiness, as I am new at this.

When I understand correct, you have problems re-creating the system configurations you had. Those are mostly in /etc.

Apart from making backup’s of the user data (in my situation the files in /home). I make backups of files in /etc (configurations), /boot (grub configurations), /root (root user may have some data there) and /srv (because I run a web-server from there).

I do not use dd for backup purposes. I make backups on the file level (using rsync, but depending on the situation cp may be OK). Easy to restore individual files when needed (a user may have thrown away or completely malformed a document).

BTW, dd reads/writes byte for byte. It is agnostic for what those bytes represent, thus it “knows” nothing about files (or even what is a file), thus talking about copying so called “hidden files” (in fact files with a name starting with a . (dot)) when letting dd work with a partition or disk has no meaning.

As to your question if “dd if=/dev/sda of=<output_file>” would work if written back to /dev/sdc, yes that should work as long as your bootloader can load the image and /cat/fstab is correct(ed).

dd is a low-level copy and copies everything including empty sectors, because of that using compression is a good idea, see for example Full Metal Backup Using the dd Command.

For this I have a text document that I update with everything I change and that I try, often which the link where I found the info and sometimes with the output of the commands.
Not only handy for re-installation but sometimes also for helping others on the forum.

It seems like the easiest and most seamless option would be to set up a RAID 0 where the primary drive continually mirrors to the other. If the primary fails, the other takes over seamlessly. I ran that for years on hard drives for redundancy. I set them up as a software RAID 0 using mdadm.

A RAID is not a substitute for making backups.

No, you still need data backups, no argument there. But, a RAID provides instant full operational capability in the event of a drive failure. That seems to be the OP’s concern. He has data backups, but no bootable backup system.

Thanks Tanker bob, this is what I am looking for, and i can use a smaller drive I already have laying around. I will read up on raid 0.

RAID0 is a means to lose all data from two drives due to the failure of only one drive. Mirroring one drive to another is RAID1.