What is this about ? ******************** This script helps to copy a backup created by RsyncBackup to a USB attached disk drive. This is an interactive script designed to be used by an end user. The user will be required to login to the machine (ssh or putty) and type one command: backup and then follow the prompts that allow: * removal of old archives (should the disk be getting full); * selection of which machines' backups to copy to the USB drive. The USB drive should be formatted as a file system (eg ext3). The archives are written to the drive as gzipped tar files. This is designed to be used in conjunction with RsyncBackup which will have created a backup of (remote) machines to an archive partition on the local machine. Installation ************ Copy the file UsbBackup to /usr/local/bin and make it executable. Note that this script used the Korn Shell (ksh), you may need to install this on your machine. The script backup should also be copied to /usr/local/bin and made executable. You may need to tweak it -- device name or mount point, logfile. This is the script that you tell the end user to run, ie they just type: backup Edit /etc/sudoers with something like that below. Substitute appropriate user names and machine name: User_Alias BACKUP_ADMINS = john, addw BACKUP_ADMINS archive.example.co.uk = NOPASSWD:/usr/local/bin/UsbBackup Preparation of the USB disk *************************** Plug the disk in, it will become available as /dev/sda or similar. Partition the disk with fdisk: fdisk /dev/sda Create a partition '1' - /dev/sda1, make it type 83 (Linux). Format: mkfs.ext3 /dev/sda1 or mke2fs -j /dev/sda1 Create the file BackupDisk in the root of the file system. This file is checked for by the script ... if it doesn't exist, an error is assumed. Something like: mount /dev/sda1 /media/usbdisk touch /media/usbdisk/BackupDisk umount /media/usbdisk Options ******* -d dev Device name on which the USB device appears, default /dev/sda1 -D dir Directory where the USB device will be mounted, default /media/usbdisk -l Local directory where the backups are found, default /arch -L file Log file - default /var/log/UsbBackup -m Machines to show to the user. You may use this to limit the machines seen by a user. If this is not given a list of names is taken from what is found under /arch (lost+found will be ignored). -q Quiet mode -v Verbose mode -x eXplain -- give a help message. License ******* This software is copyright (c) Alain Williams , 2006. This software is released under the GPLv3, see: http://www.gnu.org/licenses/gpl-3.0.html Contributing ************ UsbBackup is free software (see the license). Free software grows and becomes more powerful and useful as those who gain by using it contribute their changes back to the original author. Contributions to this software are welcome. Please email the author the following: * your name & email address * your affiliation (company/institute/...) if any * the code * documentation * a statement that you are legally able to release the code and documentation * a statement transfering copyright to the Author below giving permission that it may be redistributed as part of UserAdmin under an appropriate license Contributions will be acknowledged in the Contributors file that accompanies this software. If you do not want to be acknowledged please make that clear. SCCS: @(#)README 1.3 07/13/08 18:16:39