Home Man
Search
Today's Posts
Register

Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

Help finding a Unix friendly RAID 1 backup

Tags
filesystem

👤 Login to reply

 
Thread Tools Search this Thread
# 15  
Old 03-28-2011
Quote:
All it does is load the ability to understand XFS filesystems, if available. It's safe.
So I used the lsmod command, then the modprobe xfs command and then the lsmod command again, the difference was the following was added:

Code:
Module                  Size  Used by
xfs                   458072  0

I then tried cat /proc/filesystems command again and received:

Code:
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cpuset
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   pipefs
nodev   anon_inodefs
nodev   tmpfs
nodev   inotifyfs
nodev   devpts
nodev   ramfs
nodev   hugetlbfs
nodev   mqueue
nodev   usbfs
        ext3
nodev   rpc_pipefs
nodev   nfsd
        xfs

I assume that means that the server does in fact support XFS? Is it normal that the size is so large? Its twice the size of the next largest mod.

Quote:
Quote:
Quote:
So what you're saying is, I would make a mirror of the entire system hard drive, and then weekly, could do backups, more similar to the online style, where I just upload file changes?
Yeah.

Quote:
Finally, if I really wanted to, could I do both?
Absolutely. A hardware mirror can swallow a single-disk failure and keep going, plus weekly backups to your external drive can save you from more drastic things.
OK. So I will potentially setup a mirror on the external hard drive using the first option you provided. Next week, when I want to start weekly backups, what do I do, as in how will those backups be done? Do I redo the entire process weekly? Can I set it up to only update the changes?(Is this where a cron job comes in?) Or, do I mirror the drive and then download weekly tarballs (is it even feasible or wise to have both systems on the same drive)?
# 16  
Old 03-28-2011
Yep, you have XFS support. Doesn't matter if you're cloning the disk anyway.
Quote:
Is it normal that the size is so large? Its twice the size of the next largest mod.
It's a pretty complicated filesystem.
Quote:
Next week, when I want to start weekly backups, what do I do, as in how will those backups be done?
You've got a lot of options there. You could clone the /home filesystem again(might be doable without powering the system down, if you remount it read-only and sync, since that won't deny you access to the rest of the system), or freshen the files with rsync, or make a more complicated backup scheme where you make tarballs only of files that've been changed since last time, or more... I won't be able to lead you lock-step every step of the way because what you do depends very much on what you want and what you have and how your system is set up. You're going to need to learn more about your system.
# 17  
Old 03-29-2011
Okay, so I have a few fairly specific questions you may be able to help me with:

Based upon the tutorial you provided for the two options:

Quote:
Instead I'd suggest booting a gentoo minimal liveCD. The amd64 disk is probably better if your system can boot 64-bit at all (whether your server's OS is 64-bit isn't relevant for an offline backup, just your CPU). You can make your server reboot cleanly by running /sbin/reboot , it may take several minutes as it will try to shut down things in an orderly fashion. When it reboots, make it boot the Gentoo CD, it should boot you to a raw Linux root prompt. From there you can do this:
  • fdisk -l to see what your main hard drive is. It'll almost certainly be /dev/sda but it's good to be sure! (Ignore sda1, sda2, etc -- those are partitions. We want the whole disk.)
  • chmod 400 /dev/sda* Prevent yourself from writing to your company drive and any partitions on it. Just insurance. The setting doesn't exist outside of the livecd's tiny mind, so it'll forget this next reboot.
  • Plug in your Buffalo disk with USB, wait 15 seconds, then fdisk -l again. It will probably show up as /dev/sdb. Press enter to get a prompt back if kernel debug messages print garbage over it.
  • dd if=/dev/sda of=/dev/sdb bs=16777216 && /sbin/poweroff or, "copy the raw contents of /dev/sda into /dev/sdb, then turn off the server". It will be stonily silent while doing this, but your hard drive activity light will suddenly be mostly solid-on. (The bs=16777216 is just for efficiency -- copy 16 megs at a time instead of 512 bytes at a time.)
  • Once it finishes, it will turn off(literally, power itself completely off) to let you know the backup is complete and it's now safe to remove the USB drive, CD, and let the server boot back up normally. If an error happens, it won't turn off, just go back to a prompt and wait.

  • This will take roughly four to eight hours, I think. In the end you'll have a raw, bare-metal backup; Windows won't be able to use it, but Linux can, and if your server's hard drive dies, you could crack the drive out of your Buffalo's case and expect it to boot normally inside your server. (Assuming, of course, it has the proper connectors.)

    There might even be ways to keep the /home partition on it fresh once you make it since your Linux server will still be able to talk to this disk.

    B) Online backup. It won't back up the whole server, just your company's datafiles. You may be able to do this with minimal interruption to the server's clients, but, files in use may not be backed up properly.
  • Plug the USB drive into the server, wait 15 seconds, fdisk -l . See if it lists the partitions on your USB disk. There may be several but the largest one should be the data one.
  • Try to mount the disk. mkdir /mnt/backup then mount /dev/sdb1 /mnt/backup . May not be sdb1 of course!
  • tar -vcpf /mnt/backup/filename-date.tar /home/ Will create one giant tarball under filename-date.tar. Filenames will pour across the screen as it adds them.
  • Once it's done, umount /mnt/backup then sync . Once the sync command finishes you know it will be safe to power down and unplug your USB drive.
  • For Option A:
    For the gentoo minimal liveCD, I went to their website and I think found the correct file on one of their mirrors. Using RIT's mirror as an example found here: Index of /gentoo/releases/alpha/current-iso/
    do I want to use this file: install-alpha-minimal-20110319.iso ?

    (Neither the OS nor the CPU are 64 bit, I checked, or at least I think I did.)

    When I do power down the server and use the LiveCD, you said to "make it boot the Gentoo CD"; how do I make it do that?

    For Option B:
    If I make the tar file and in the future want to back it up again on a weekly basis; how would I change this code to make it apply?

    Code:
    tar cvf /dev/st0 'find / -mtime -1 -type f -print'

    From what I understand, the -mtime -1 portion of the code determines the duration to search for new files; in my case would I make it -mtime -7 ?

    Is this correct?

    My plan, assuming I can get the appropriate minimal liveCD file, is to do the 'bare metal' backup tomorrow and do weekly backups from there. If I don't think I can get that to work (i.e. I don't feel comfortable with it) I'll go the tarball route for now.

    If I go the tarball route for now on the external drive and then next week decide to try the bare metal on the same drive, what happens to the tarball? What if the situation is reversed?

    Thanks again.
    # 18  
    Old 03-29-2011
    Quote:
    Originally Posted by c.wakeman
    Okay, so I have a few fairly specific questions you may be able to help me with:

    Based upon the tutorial you provided for the two options:

    For Option A:
    For the gentoo minimal liveCD, I went to their website and I think found the correct file on one of their mirrors. Using RIT's mirror as an example found here: Index of /gentoo/releases/alpha/current-iso/
    do I want to use this file: install-alpha-minimal-20110319.iso ?
    No, you don't have an alpha. You have an x86 or an amd64.

    Try cat /proc/cpuinfo to see what CPU you really have.

    Quote:
    When I do power down the server and use the LiveCD, you said to "make it boot the Gentoo CD"; how do I make it do that?


    1) Turn it on
    2) Check the CMOS settings to make sure the CDROM boots first (BIOS dependent)
    3) Put in the disk
    4) Wait
    Quote:
    For Option B:
    Forget option B. You can't do that and a bare-metal backup. You really ought to have a proper backup of the entire system if you're intending to put in a RAID at some point.

    How you freshen the bare-metal backup would be completely different from option B. There's a couple ways to do it and none of them involve tar. How you do it depends on a) what you want to do b) what things you need to shut down to do so c) what devices the USB drive shows up as. We still know next to nothing about what your system is doing so I can't advise you on any of those.
    Quote:
    If I go the tarball route for now on the external drive and then next week decide to try the bare metal on the same drive, what happens to the tarball?
    Quote:
    Originally Posted by Corona688
    It dumps the contents of sda into sdb with complete ignorance of the meaning of data in sda and complete disregard for any current contents of sdb.

    Last edited by Corona688; 03-29-2011 at 06:12 PM..
    # 19  
    Old 03-29-2011
    Quote:
    No, you don't have an alpha. You have an x86 or an amd64.


    Try cat /proc/cpuinfo to see what CPU you really have.
    This is what I got:
    Code:
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 15
    model           : 2
    model name      : Intel(R) Pentium(R) 4 CPU 3.40GHz
    stepping        : 9
    cpu MHz         : 3391.613
    cache size      : 512 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 1
    apicid          : 0
    initial apicid  : 0
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 2
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
    bogomips        : 6789.30
    clflush size    : 64
    power management:
    
    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 15
    model           : 2
    model name      : Intel(R) Pentium(R) 4 CPU 3.40GHz
    stepping        : 9
    cpu MHz         : 3391.613
    cache size      : 512 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 1
    apicid          : 1
    initial apicid  : 1
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 2
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
    bogomips        : 6783.37
    clflush size    : 64
    power management:


    Quote:
    1) Turn it on
    2) Check the CMOS settings to make sure the CDROM boots first (BIOS dependent)
    3) Put in the disk
    4) Wait
    OK, that seems straightforward. Sorry for the stupid question.

    Quote:
    Forget option B. You can't do that and a bare-metal backup. You really ought to have a proper backup of the entire system if you're intending to put in a RAID at some point.

    How you freshen the bare-metal backup would be completely different from option B. There's a couple ways to do it and none of them involve tar. How you do it depends on a) what you want to do b) what things you need to shut down to do so c) what devices the USB drive shows up as. We still know next to nothing about what your system is doing so I can't advise you on any of those.
    Fair enough. When I get to the point of freshening the bare-metal backup, how would I go about figuring out that info so that you can continue to provide awesome advice?

    Thank you for your quick replies and patience.
    # 20  
    Old 03-29-2011
    I think you're right, you have a 32-bit machine. Use the install-x86-minimal CD.

    When the CD boots it'll pour text across the screen for abit. That's normal. Wait until it brings you to a red root prompt to start typing things in.

    Um, Try cat /etc/issue ? I still don't know what your system's distro is and am running out of ways to find out.

    How you'd freshen the bare-metal backup? A couple ways. All of them would involve mounting the disk somehow(might be sdb6 or sdc6 or something like that, but not sda6) and updating its contents.

    1) You could halt whatever service is serving files, cp -Rp /home/* /mnt/whatever, and start the service again. Simple, but slow since it copies files it already has, and won't delete any files that were deleted from your server in the meantime so it'll tend to accumulate old files.
    2) Same as 1, but delete everything first. Even slower since it does even more work, but won't accumulate dead files.
    3) rsync or something like rsync, to keep them synchronized. Smart enough to trawl through the drives and only update changed things. I'd need to research how to do this safely and sanely.

    Last edited by Corona688; 03-29-2011 at 06:36 PM..
    # 21  
    Old 03-30-2011
    Regarding the distro, I used the cat /etc/issue command and received

    Code:
    Debian GNU/Linux 5.0 \n \l

    I then used cat /proc/version and received:

    Code:
    Linux version 2.6.26-2-686 (Debian 2.6.26-22lenny1) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Wed May 12 21:56:10 UTC 2010

    I tried both cat /etc/Debian-version and cat /etc/Debian-release; neither were recognized.
    👤 Login to reply

    « Previous Thread | Next Thread »
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes

    More UNIX and Linux Forum Topics You Might Find Helpful
    Thread Thread Starter Forum Replies Last Post
    Mobile Friendly Version of UNIX.COM Neo What is on Your Mind? 2 07-19-2016 10:30 AM
    Backup/RAID of HD on Old UNIX Server chrishouse SCO 21 10-03-2015 02:04 PM
    SCSI PCI - X RAID Controller card RAID 5 AIX Disks disappeared filosophizer AIX 0 06-14-2011 02:20 PM
    Converting MSVC /showInclude to unix friendly path krad Shell Programming and Scripting 7 02-17-2011 07:46 PM
    raid 1 configuration in sco open unix sudhir69 SCO 0 03-27-2009 07:11 AM
    User friendly Unix ksh prompt to type directories/files abdurrouf UNIX for Advanced & Expert Users 3 02-15-2008 05:07 PM
    RAID 0 on Unix zmachine04 HP-UX 5 12-22-2005 09:37 PM
    Unix Sco 5.0.7 Raid Problems josramon UNIX for Advanced & Expert Users 0 12-21-2004 12:10 PM
    RAID Unix command zuinc UNIX for Dummies Questions & Answers 2 05-07-2002 10:19 AM


    All times are GMT -4. The time now is 04:44 PM.

    Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
    UNIX.COM Login
    Username:
    Password:  
    Show Password