Results 1 to 8 of 8

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

  1. #1

    Question 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)-

    Code:
    # 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.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    28,879

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

    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.
    Henk van Velden

  3. #3
    Join Date
    Oct 2014
    Location
    Rotterdam
    Posts
    548

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

    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.

    Quote Originally Posted by johnkilbert View Post
    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)-
    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.

  4. #4

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

    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.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    28,879

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

    A RAID is not a substitute for making backups.
    Henk van Velden

  6. #6

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

    Quote Originally Posted by hcvv View Post
    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.

  7. #7

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

    Quote Originally Posted by tanker_bob View Post
    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.

  8. #8
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    3,014
    Blog Entries
    1

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

    Quote Originally Posted by johnkilbert View Post
    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.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 15.2, +TW, 15.3, 15.1 & 13.1 on Haswell
    Secondary: eComStation (OS/2) &15.2 on i965P w/ Radeon
    Tertiary: Mageia,Fedora,Debian,more on Kaby Lake,iQ45,iQ43,iG41,iG3X,i965G,AMD,NVidia&&&&&

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •