glucopy-glurestore

glucopy-glurestore is a set of scripts for copying and restoring a fully functional GNU/Linux (or other Unix-like) system.
Download

glucopy-glurestore Ranking & Summary

Advertisement

  • Rating:
  • License:
  • FDL
  • Price:
  • FREE
  • Publisher Name:
  • Dimitri Marinakis and John Poulakis
  • Publisher web site:
  • http://tlgu.carmen.gr/

glucopy-glurestore Tags


glucopy-glurestore Description

glucopy-glurestore is a set of scripts for copying and restoring a fully functional GNU/Linux (or other Unix-like) system. glucopy-glurestore is a set of scripts for copying and restoring a fully functional GNU/Linux (or other Unix-like) system.The glucopy script will back up all system content (system and user files), while the glurestore script will partition and format an identical system, restore the system and user files, and make the system bootable.glucopy-glurestore scripts are included in the HTML documentation.The back-up should (ideally) be made while the system is not running, which usually means that you need to boot with a rescue system disk. A number of suitable floppy or CD-based system images can be downloaded from the net or, better, included in your distribution's boot options. Make sure that this rescue system supports the type of disks in your target system (SATA/SCSI or IDE).The following script will get partition information in a form that can be used to restore the system on new disks and will then collect the working system files in one (or more) compressed tar balls.The sfdisk program is used for getting partition information (-d option). Take a look at sys_partitions.txt after the glucopy.sh script has finished.In this application it is considered that all Master Boot Record (MBR) information will be overwritten by the partitioning and boot loader programs. If you need a copy of all or parts of the MBR, however, dd is your friend.System directories that contain transient information (e.g. /proc, /sys) are not copied. Directories or individual files containing unwanted information can be excluded using tar's –exclude=/directory/file option.#!/bin/sh############################ glucopy.sh## Creates the /glucopy directory# Copies partition information in sys_partitions.txt# Optionally makes a copy of the MBR in mbr.bin# Copies working GNU/Linux system to .tgz files## USAGE:# Boot system with a rescue CD or any bootable CD# that supports your type of disks (SATA/SCSI or IDE).# run the back-up script: ./glucopy.sh# # In this example the system is on /dev/sda# /dev/sda1 is a small partition with HW manufacturer utilities# /dev/sda2 has system root (/) -> mounted to /mnt# /dev/sda3 is a spare (blank) partition# /dev/sda4 has home (/home) and space to hold# the information to be copied -> mounted to /mnt2## 061116 jp/dm############################ Change the following to reflect the place where your system root (/) # and the home directories (/home/*) are mountedmkdir /tmp/mnt1mkdir /tmp/mnt2mount /dev/sda2 /tmp/mnt1mount /dev/sda4 /tmp/mnt2# The directory to hold the system copy is placed on the larger partitionmkdir /tmp/mnt2/glucopy# Change to the working directorycd /tmp/mnt2/glucopy# Optionally copy MBR information#dd if=/dev/sda of=mbr.bin bs=512 count=1# Copy partition information/sbin/sfdisk -d /dev/sda > sys_partitions.txt# Make tarballstar -C /tmp/mnt1 -cvzf syscopy.tgz boot bin etc lib media opt root sbin usr var dev # Move up a levelcd ..# here we are under the /home directory level# notice that --exclude will exclude anything that matches a _pattern_# the glucopy directory will still be created in the tarballtar -cvzf ./glucopy/homecopy.tgz * --exclude=glucopy/*# Copy the backup/restore scripts (here under root /), and the sfdisk program, as wellcp /glucopy.sh ./glucopycp /glurestore.sh ./glucopycp /sbin/sfdisk ./glucopy# Notify userecho -e “glucopy: finished a”


glucopy-glurestore Related Software