Help finding a Unix friendly RAID 1 backup


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Help finding a Unix friendly RAID 1 backup
# 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:
  1. 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.)
  2. 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.
  3. 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.
  4. 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.)
  5. 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. Smilie 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?
Smilie

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 07:12 PM..
# 19  
Old 03-29-2011
Quote:
No, you don't have an alpha. Smilie 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:

Smilie
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 07: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 or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

Mobile Friendly Version of UNIX.COM

Hello, I have noticed some problems with Google complaining our site is not "https://search.google.com/www.usearch-console/mobile-friendly" using only Tapatalk. So, after a lot of work, I have re-enabled our legacy mobile style and make some improvements and Google has declared us "mobile... (2 Replies)
Discussion started by: Neo
2 Replies

2. SCO

Backup/RAID of HD on Old UNIX Server

I need to be able to make a backup image of an OLD UNIX server HD where I can restore the complete HD from scratch if (when) the HD fails. This server runs the accounting system for a company. I can and have backed the data up via local FTP, but O/S and Apps are so old that I am not sure I could... (21 Replies)
Discussion started by: chrishouse
21 Replies

3. Red Hat

RAID Configuration for IBM Serveraid-7k SCSI RAID Controller

Hello, I want to delete a RAID configuration an old server has. Since i haven't the chance to work with the specific raid controller in the past can you please help me how to perform the configuraiton? I downloaded IBM ServeRAID Support CD but i wasn't able to configure the video card so i... (0 Replies)
Discussion started by: @dagio
0 Replies

4. AIX

SCSI PCI - X RAID Controller card RAID 5 AIX Disks disappeared

Hello, I have a scsi pci x raid controller card on which I had created a disk array of 3 disks when I type lspv ; I used to see 3 physical disks ( two local disks and one raid 5 disk ) suddenly the raid 5 disk array disappeared ; so the hardware engineer thought the problem was with SCSI... (0 Replies)
Discussion started by: filosophizer
0 Replies

5. Shell Programming and Scripting

Converting MSVC /showInclude to unix friendly path

Hi guys, I've been trying to do this for hours, and I've just been running around in circles trying to get this script made. I have a set of files outputted by an MSVC compiler that looks like this 1> helloworld.cpp 1> Note: including file: c:\dev\test\makefile\source\helloworld.h 1> ... (7 Replies)
Discussion started by: krad
7 Replies

6. UNIX for Advanced & Expert Users

User friendly Unix ksh prompt to type directories/files

Hello, I wanted to setup user friendly ksh command prompt, by typing first character of files or directories and then tab bring up whole word. No need to type whole file/directory/command names. Example: cat a file like university just typing un and then tab bring up whole university wod.... (3 Replies)
Discussion started by: abdurrouf
3 Replies

7. HP-UX

RAID 0 on Unix

I was wanting to know if anyone knew how to setup RAID 0 on an old HP Unix server. It's for where I work and my boss has two hard drives and wants the second to take over if the first one fails hence RAID 0. If anyone could help me it would be greatly appreciated. (5 Replies)
Discussion started by: zmachine04
5 Replies

8. UNIX for Advanced & Expert Users

Unix Sco 5.0.7 Raid Problems

Hello there guys , I have this problem , i have this hp smart array 641 raid card and i'm trying to install sco unix 5.0.7 and is says no root disk found right before the instalation is about to start. I know that you have to load the driver befor the install bud i really cannot find the... (0 Replies)
Discussion started by: josramon
0 Replies

9. UNIX for Dummies Questions & Answers

RAID Unix command

Is there a command used to determine whether or not a machine has been RAIDed besides using 'df -k'. I am interested b/c I am writing a script where I would like to receive some sort of notification as to whether or not a machine has been RAIDed. The simpler the info returned back, the better. ... (2 Replies)
Discussion started by: zuinc
2 Replies
Login or Register to Ask a Question