Jump to content

Backup Script for RAID configuration - what all should I include


Recommended Posts

Want to set up a Backup/Archive Script for RAID configuration files that I'll include in my go file so that I'll have a version of them at every reboot.

 

I'm guess I would want /boot/syslinux.cfg and everything in /boot/config

 

Anything/anywhere else that you might think of?

 

Or would it just be best to just tar up the entire /boot structure?

 

What are others doing to archive/version their configs to maintain history of changes and make it easy to revert if needed?

 

 

 

Link to comment

Want to set up a Backup/Archive Script for RAID configuration files that I'll include in my go file so that I'll have a version of them at every reboot.

 

I'm guess I would want /boot/syslinux.cfg and everything in /boot/config

 

Anything/anywhere else that you might think of?

 

Or would it just be best to just tar up the entire /boot structure?

 

What are others doing to archive/version their configs to maintain history of changes and make it easy to revert if needed?

It would depend on if you added your own directories under /boot.

 

If you added /boot/packages to hold downloaded add-on packages, you would want it.

 

a "tar" archive would work.

 

What I've often done is to make a "dd" image of the entire flash drive, that way, I get everything, including the boot sector.

My flash drive is /dev/sdg, so I can type:

dd if=/dev/sdg  | gzip -c >/mnt/disk1/data/unraid_flash_drive_2010-07-01.img.gz

To restore, all you need do is un-gzip to "dd" with the output set to the new flash drive.  The replacement drive after being restored from the "dd"  image will already have syslinux installed, will be bootable, partitioned, and already labeled as "UNRAID"

 

Or if you only want to look at the files on an older version, you can probably un-gzip and then mount the .img file via a loop device. 

 

Joe L.

Link to comment

I rsync -a my /boot structure to /mnt/disk1/boot and also /mnt/cache/.boot

 

I have a freedos grub4dos boot floppy that allows me to boot from one of these hard drives should the flash drive die.

I like grub4dos in these circumstances because it can read and boot from a reiserfs.

It can also search all your bios accessible hard drives to find the image you may want to access.

 

I've never had to use the floppy before because I have PXEboot setup on my network.

But I have had to use the grub4dos to access my unraid environment in a pinch.

 

GRUB4DOS /boot/menu.lst

# Grub4DOS configuration for unRAID

title find unraid on flash 
find /bzimage /bzroot /syslinux.cfg
pause Press Any Key when Ready

title find unraid on data disk 
find /boot/bzimage /boot/bzroot
pause Press Any Key when Ready

title find unraid on cache (hidden in /.boot)
find /.boot/bzimage /.boot/bzroot 
pause Press Any Key when Ready

title find and boot unraid on flash
find --set-root /bzimage /bzroot /syslinux.cfg
savedefault --wait=2
kernel /bzimage
initrd /bzroot
boot
title find and boot unraid installed on harddrive
find --set-root /boot/bzimage /boot/bzroot
savedefault --wait=2
kernel /boot/bzimage
initrd /boot/bzroot
boot

title find and boot unraid installed on cache
find --set-root /.boot/bzimage /.boot/bzroot
savedefault --wait=2
kernel /.boot/bzimage
initrd /.boot/bzroot
boot

title back to dos
# savedefault --wait=2
quit

title commandline
# savedefault --wait=2
commandline

title reboot
# savedefault --wait=2
reboot

title halt
# savedefault --wait=2
halt

 

/boot/syslinux.cfg

root@atlas /boot #more syslinux.cfg 
default menu.c32
menu title Lime Technology LLC
prompt 0
timeout 30
label unRAID OS
  menu default
  kernel bzimage
  append initrd=bzroot rootdelay=10
label unRAID OS 4.54
  kernel bzimage.454
  append initrd=bzroot.454 rootdelay=10
label Memtest86+
  kernel memtest
label unRAID OS DEV
  kernel bzimaged
  append initrd=bzrootd rootdelay=10
label unRAID OS Beta
  kernel bzimageb
  append initrd=bzrootb rootdelay=10
label FreeDos Image
  kernel memdisk
  append initrd=images/fdstd144.img
label Grub4DOS Kernel
  kernel images/grub.exe

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...