Re: [gentoo-user] Backups?

2003-11-06 Thread Paulo Jorge de Oliveira Cantante de Matos
Using rdiff-backup. Nice app! You can rdiff for a different machine and
add a line to cron to do that automatically! :D

On Mon, 2003-11-03 at 01:05, Rick [Kitty5] wrote:
 What do people do / recommend for backing up?
-- 

Paulo J. Matos : [EMAIL PROTECTED]
Instituto Superior Tecnico - Lisbon
Computer and Software Eng. - A.I.
 -  http://mega.ist.utl.pt/~pocm
---
- God had a deadline...
So, he wrote it all in Lisp!


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups?

2003-11-03 Thread Andrew Gaffney
Spider wrote:
begin  quote
On Sun, 02 Nov 2003 19:22:09 -0600
Andrew Gaffney [EMAIL PROTECTED] wrote:




I do 'tar -cjf /tmp/backup.tar.bz2 /home ... ... ...; tar -cf
/dev/tape  /tmp/backup.tar.bz2'. I really need to backup critical data
off of the box, also.


Do note that for tape issues its suggested not to use compression, since
once you get an error in a block then its far harder to recover partial
data, than it is with clean tar files.
ofc, theres bzip2recover and other nice utils, but still it poses a
problem.
I hadn't thought of this. Thanks.

--
Andrew Gaffney
--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Backups? abetter way?

2003-11-03 Thread HvR




Here is what i use from crontab once a day:

it makes a space efficient copy of every file, and every version so i can retrieve any previous version, best to put the target snapshot directory on a different drive. adapted from: http://www.mikerubel.org/computers/rsync_snapshots/

#!/bin/sh
PATH=/usr/bin:/bin:$PATH

SNAPSHOTS=/home/hans/.snapshots
DIR=/home/hans/sheets

#---
mtime()
#---
{
echo $1 | perl -e'
use strict;
my $line;
my $dev;
my $ino;
my $mode;
my $nlink;
my $uid;
my $gid;
my $rdev;
my $size;
my $atime;
my $mtime;
my $ctime;
my $blksize;
my $blocks;
my $sec;
my $min;
my $hour;
my $mday;
my $mon;
my $year;
my $wday;
my $yday;
my $mtime_string;
my @days = (Sun, Mon, Tue, Wed, Thu, Fri, Sat);
my @months = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug,
		Sep, Oct, Nov, Dec);
while ( $line = STDIN ) {
	chomp($line);
	($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
	$atime,$mtime,$ctime,$blksize,$blocks) = stat($line);
	($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime($mtime);
	$year = $year + 1900;
	$mon = $mon +1;
	printf (%.4d%.2d%.2d%.2d%.2d%.2d,$year,$mon,$mday,$hour,$min,$sec);
 $mtime_string = localtime($mtime);
	print -$mtime-;
	print $days[$wday]-;
	print $months[$mon-1]-;
	printf (%.2d-%.2d:%.2d:%.2d-%.4d,$mday,$hour,$min,$sec,$year);
}
'
}

mkdir -p $SNAPSHOTS

if [ -d $SNAPSHOTS/latest ]
then
	T=`mtime $SNAPSHOTS/latest`
	echo making snapshot $T
	cp -al $SNAPSHOTS/latest $SNAPSHOTS/$T
fi

LOG=/tmp/.log$$
rm -fr $LOG
date  $LOG
rsync -vaW --delete --exclude '*.glimpse*' --delete-excluded \
	--modify-window 61 $DIR/ $SNAPSHOTS/latest/  $LOG
mv $LOG $SNAPSHOTS/latest/.snapshotlog
touch $SNAPSHOTS/latest






Re: [gentoo-user] Backups?

2003-11-03 Thread Hemmann, Volker Armin
On Monday 03 November 2003 02:05, Rick [Kitty5] wrote:
 What do people do / recommend for backing up?

a scsi tape drive from ebay, some quality tapes, tar ;o)

-- 
Conclusions
 In a straight-up fight, the Empire squashes the Federation like a bug. Even 
with its numerical advantage removed, the Empire would still squash the 
Federation like a bug. Accept it. -Michael Wong


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups?

2003-11-03 Thread Ernie Schroder
Good point Bill. I do have ADSL and can d'load at roughly 165k/sec 
Distfiles, though becomes so large that it would soon overwhelm my 20 
gig drive that I back up to. Perhaps it would be smart to copy some 
files from distfiles to ~/home where they would be backed up and I 
could later move them back to distfiles if needed. This would however 
require more scripting to keep only the latest version of specific 
packages. Frankly, I'm not up to that task yet but I am learning :o)

Ernie

On Sunday 02 November 2003 11:32 pm, Bill Kenworthy wrote:
 One thing I noticed about your excludes:

 I use a modem so distfiles is very important when doing a
 (re)build.  As a backup script you should include all the files
 needed to get up and running.

 Unless you are one of the lucky few with nearly unlimited net
 access, and no traffic limits or have made other arrangements.

 BillK

 On Mon, 2003-11-03 at 12:58, Ernie Schroder wrote:
  On Sunday 02 November 2003 08:05 pm, Rick [Kitty5] wrote:
   What do people do / recommend for backing up?
 
  I do rsync backups as well but to a normally unmounted spun down
  drive on a second box. The script below runs at 12:01 AM daily.
  My script is still a bit crude but it evolves as I learn and get
  around to working on it
 
  #
 == #! /bin/bash
  # /usr/local/bin/my-rsync
  ###
  # Backup Script
  ###
 
  [EMAIL PROTECTED]:/mnt/backup
  EXCLUDE=/usr/local/bin/rsync-exclude
  #MAILTO=/bin/mail root
  echoMounting boot partition...
  sudo mount /boot -o ro
  echo
  echoMounting backup disk...
  ssh -T [EMAIL PROTECTED] END
  sleep 5
  mount /dev/hdb1 /mnt/backup
  END
 
  sleep 4
  echo
  echoPerforming backup...
  echo
  rsync --rsh=ssh --delete -av --exclude-from=$EXCLUDE / \
  $BACKUP_TO/rsync/ | mail -s backup daily output root
 
  echo
  echoBackup complete Unmounting boot and backup
  partitions...
 
  /bin/umount -l /boot
  ssh -T [EMAIL PROTECTED] END
  sleep 5
  umount /mnt/backup
 
  echo
  echoSpinning down backup disk...
  /sbin/hdparm -y /dev/hdb# spin down disk
  END
  #
 ==
 
 
  /usr/local/bin/rsync-exclude is a simple text file containing
  files and directories that I don't want to include in the backup.
  There are many additions I should make to this file, but I
  haven't spent much time refining it lately. The backup is
  currently just over 6 Gigs and it normally runs for about 10 to
  15 minutes. The first run was several hours. The nightly run
  deletes any files I deleted that day and then writes any new or
  altered files not specificly excluded,
 
  # /usr/local/bin/rsync-exclude:
  - /tmp/
  - /var/lib/init.d/
  - /mnt/flash   #in case I forget to umount removable
  storage - /mnt/smartcard   #media, cd's etc.
  - /mnt/tmp
  - /mnt/cdrom/
  - /mnt/floppy/
  - /proc/
  - /usr/portage/distfiles/
  - /root/.ccache/
  - /home/ernie/Shared_Music#mp3's that can be seen by p2p
  client - home/ernie/.kde3.1/share/apps/RecentDocuments/
  - /home/ernie/tmp  #Partially d'loaded mp3's
  - /home/ernie/mnt  #Samba mounts
  - /var/tmp/portage

 --
 [EMAIL PROTECTED] mailing list

-- 
Regards, Ernie
100% Microsoft and Intel free


--
[EMAIL PROTECTED] mailing list



[gentoo-user] Backups?

2003-11-02 Thread Rick [Kitty5]
What do people do / recommend for backing up?

-- 
Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News  Resources http://Povray.co.uk
TEL : +44 (01270) 501101 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x231E1CEA




--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups?

2003-11-02 Thread Andrew Farmer
On Sun, 02 Nov 2003 17:05:16 -0800, Rick [Kitty5] muttered:
 What do people do / recommend for backing up?

I rsync my $HOME to a secondary hard disk.

-- 
Andrew Farmer
[EMAIL PROTECTED]


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] Backups?

2003-11-02 Thread Andrew Gaffney
Rick [Kitty5] wrote:
What do people do / recommend for backing up?
I run Gentoo on a production server. I have 2 different backup methods. First, I have a 
second HD of identical size that I do a nightly rsync to. Second, I have a tape backup 
drive. I do 'tar -cjf /tmp/backup.tar.bz2 /home ... ... ...; tar -cf /dev/tape 
/tmp/backup.tar.bz2'. I really need to backup critical data off of the box, also.

--
Andrew Gaffney
--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Backups?

2003-11-02 Thread MadMax
Can you share the script/crontab etc you use to accomplish this?

Currently I just create a tarball of $home and put it on a secondary
disk, but I do it by hand every night before I go to bed.

Cheers:)
Max.

On Mon, 2003-11-03 at 11:39, Andrew Farmer wrote:
 On Sun, 02 Nov 2003 17:05:16 -0800, Rick [Kitty5] muttered:
  What do people do / recommend for backing up?
 
 I rsync my $HOME to a secondary hard disk.


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups?

2003-11-02 Thread Andrew Farmer
On Sun, 02 Nov 2003 17:24:35 -0800, MadMax muttered:
 Can you share the script/crontab etc you use to accomplish this?

The script follows. Note that I'm just synchronizing some directories from
my $HOME -- stuff left sitting in there won't get synchronized (though one
could probably fix this pretty easily).

(The crontab line is:
30 5 * * * $HOME/bin/sync-stuff
so it'll run every day at 05:30)

#!/bin/zsh

# location to back up to
LOC=/mnt/backup/andfarm-home

# list of directories to back up
BACKUP='bin MozillaFirebird doc evolution cdev' 

cd $HOME
# Back up dotfiles
echo Backing up dotfiles
rsync -a --delete .* $LOC

# Back up other important stuff (except MP3s)
for x in `echo $BACKUP`
echo Backing up $x
rsync -a --delete --delete-excluded --exclude /doc/mp3** $x $LOC

echo Backup/sync process complete

-- 
Andrew Farmer
[EMAIL PROTECTED]


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] Backups?

2003-11-02 Thread Ernie Schroder
On Sunday 02 November 2003 08:05 pm, Rick [Kitty5] wrote:
 What do people do / recommend for backing up?


I do rsync backups as well but to a normally unmounted spun down drive 
on a second box. The script below runs at 12:01 AM daily. My script 
is still a bit crude but it evolves as I learn and get around to 
working on it

#==
#! /bin/bash
# /usr/local/bin/my-rsync
###
# Backup Script
###

[EMAIL PROTECTED]:/mnt/backup
EXCLUDE=/usr/local/bin/rsync-exclude
#MAILTO=/bin/mail root
echoMounting boot partition...
sudo mount /boot -o ro
echo
echoMounting backup disk...
ssh -T [EMAIL PROTECTED] END
sleep 5
mount /dev/hdb1 /mnt/backup
END

sleep 4
echo
echoPerforming backup...
echo
rsync --rsh=ssh --delete -av --exclude-from=$EXCLUDE / \
$BACKUP_TO/rsync/ | mail -s backup daily output root

echo
echoBackup complete Unmounting boot and backup partitions...

/bin/umount -l /boot
ssh -T [EMAIL PROTECTED] END
sleep 5
umount /mnt/backup

echo
echoSpinning down backup disk...
/sbin/hdparm -y /dev/hdb# spin down disk
END
#==


/usr/local/bin/rsync-exclude is a simple text file containing files 
and directories that I don't want to include in the backup. There are 
many additions I should make to this file, but I haven't spent much 
time refining it lately. The backup is currently just over 6 Gigs and 
it normally runs for about 10 to 15 minutes. The first run was 
several hours. The nightly run deletes any files I deleted that day 
and then writes any new or altered files not specificly excluded,

# /usr/local/bin/rsync-exclude:
- /tmp/
- /var/lib/init.d/
- /mnt/flash   #in case I forget to umount removable 
storage 
- /mnt/smartcard   #media, cd's etc.
- /mnt/tmp
- /mnt/cdrom/
- /mnt/floppy/
- /proc/
- /usr/portage/distfiles/
- /root/.ccache/
- /home/ernie/Shared_Music#mp3's that can be seen by p2p client
- home/ernie/.kde3.1/share/apps/RecentDocuments/
- /home/ernie/tmp  #Partially d'loaded mp3's
- /home/ernie/mnt  #Samba mounts
- /var/tmp/portage


-- 
Regards, Ernie
100% Microsoft and Intel free


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups?

2003-11-02 Thread Bill Kenworthy
One thing I noticed about your excludes:

I use a modem so distfiles is very important when doing a (re)build.  As
a backup script you should include all the files needed to get up and
running.

Unless you are one of the lucky few with nearly unlimited net access,
and no traffic limits or have made other arrangements.

BillK

On Mon, 2003-11-03 at 12:58, Ernie Schroder wrote:
 On Sunday 02 November 2003 08:05 pm, Rick [Kitty5] wrote:
  What do people do / recommend for backing up?
 
 
 I do rsync backups as well but to a normally unmounted spun down drive 
 on a second box. The script below runs at 12:01 AM daily. My script 
 is still a bit crude but it evolves as I learn and get around to 
 working on it
 
 #==
 #! /bin/bash
 # /usr/local/bin/my-rsync
 ###
 # Backup Script
 ###
 
 [EMAIL PROTECTED]:/mnt/backup
 EXCLUDE=/usr/local/bin/rsync-exclude
 #MAILTO=/bin/mail root
 echoMounting boot partition...
 sudo mount /boot -o ro
 echo
 echoMounting backup disk...
 ssh -T [EMAIL PROTECTED] END
 sleep 5
 mount /dev/hdb1 /mnt/backup
 END
 
 sleep 4
 echo
 echoPerforming backup...
 echo
 rsync --rsh=ssh --delete -av --exclude-from=$EXCLUDE / \
 $BACKUP_TO/rsync/ | mail -s backup daily output root
 
 echo
 echoBackup complete Unmounting boot and backup partitions...
 
 /bin/umount -l /boot
 ssh -T [EMAIL PROTECTED] END
 sleep 5
 umount /mnt/backup
 
 echo
 echoSpinning down backup disk...
 /sbin/hdparm -y /dev/hdb# spin down disk
 END
 #==
 
 
 /usr/local/bin/rsync-exclude is a simple text file containing files 
 and directories that I don't want to include in the backup. There are 
 many additions I should make to this file, but I haven't spent much 
 time refining it lately. The backup is currently just over 6 Gigs and 
 it normally runs for about 10 to 15 minutes. The first run was 
 several hours. The nightly run deletes any files I deleted that day 
 and then writes any new or altered files not specificly excluded,
 
 # /usr/local/bin/rsync-exclude:
 - /tmp/
 - /var/lib/init.d/
 - /mnt/flash #in case I forget to umount removable 
 storage 
 - /mnt/smartcard #media, cd's etc.
 - /mnt/tmp
 - /mnt/cdrom/
 - /mnt/floppy/
 - /proc/
 - /usr/portage/distfiles/
 - /root/.ccache/
 - /home/ernie/Shared_Music#mp3's that can be seen by p2p client
 - home/ernie/.kde3.1/share/apps/RecentDocuments/
 - /home/ernie/tmp  #Partially d'loaded mp3's
 - /home/ernie/mnt  #Samba mounts
 - /var/tmp/portage


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups?

2003-11-02 Thread Spider
begin  quote
On Mon, 3 Nov 2003 01:05:16 -
Rick [Kitty5] [EMAIL PROTECTED] wrote:

 What do people do / recommend for backing up?


rdiff backup to offline medium.  Tape archives/cdrom for snapshots
((bi)Weekly, usually a saturday job with sms messaging so it can be
fixed on sunday if things go bad) and then nightly rdiff updates to an
external host's external harddrive. (Yep.)


//Spider

-- 
begin  .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] Backups?

2003-11-02 Thread Spider
begin  quote
On Sun, 02 Nov 2003 19:22:09 -0600
Andrew Gaffney [EMAIL PROTECTED] wrote:




 I do 'tar -cjf /tmp/backup.tar.bz2 /home ... ... ...; tar -cf
 /dev/tape  /tmp/backup.tar.bz2'. I really need to backup critical data
 off of the box, also.


Do note that for tape issues its suggested not to use compression, since
once you get an error in a block then its far harder to recover partial
data, than it is with clean tar files.

ofc, theres bzip2recover and other nice utils, but still it poses a
problem.


//Spider

-- 
begin  .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] Backups

2003-08-14 Thread Frank Tegtmeyer
Karl Huysmans [EMAIL PROTECTED] writes:

 2-disk/1-spare software RAID 1. 
 
 This will not protect you against accidental file deletion or (???)
 viruses, but at least, you don' t even have to think about backups.

At least in typical office environments backups are mostly used
exactly for that reasons: accidental file deletion and malware. This
implies also that the backup frequency must be high enough to catch
such situations.

I recommend preparing for this failures also to the home
user. Everybody makes mistakes, so deleting important files may not be
too uncommon also on home workstations.

Regards, Frank

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-08-14 Thread Brett I. Holcomb
It depends on the amount of data you have.  Hard drives and tapes can backup 
a lot of data.  However, for a home user you probably aren't backing up that 
much.  For ease of ue take a look at using a CDR or CDRW.  If you have more 
than fits on one CD then split you backups up to use more CDs.  You can also 
backup to another system's hard drive if you have space (which yoiu indicate 
you don't) but sooner or later that should be backed up to another media.


 Hi list!

 What is better to use for backups at home - CD-Rs, CD-RWs, another
 harddrive or something else?

 The standard way is to use tapes, but they are way too expensive for a home
 desktop system. Harddrives are also not that good, because I want to backup
 a harddrive in the first place, and anyway my system is already full so I'd
 have to swap harddrives or buy an external one for backup. And that is not
 really cheap also.

 So what do you suggest? How and how often do you make backups?


 Regards,
 Renat

-- 

Brett I. Holcomb
AKA Grunt 

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-08-14 Thread Brett I. Holcomb
I've used CDRs for the backups I've done on CD.  They are cheap enough that 
they work out better than trying to do a CDRW over and over.

Backup anything you can't afford to loose G.  Some things in your home 
directory - personal stuff such as financial and other records you want to 
keep.  You only need some of /etc - the stuff that gets changed, any local 
scripts or programs you write.

 On Sunday 10 August 2003 04:31, Brett I. Holcomb wrote:
  It depends on the amount of data you have.  Hard drives and tapes can
  backup a lot of data.  However, for a home user you probably aren't
  backing up that much.  For ease of ue take a look at using a CDR or CDRW.
   If you have more than fits on one CD then split you backups up to use
  more CDs. You can also backup to another system's hard drive if you have
  space (which yoiu indicate you don't) but sooner or later that should be
  backed up to another media.

 Yes, I figured that CDR and CDRW would be best. But there is difference
 also. CDRWs are more expensive and some CD readers read them not so
 reliably as CDRs. CDRs on the other hand are cheap, and are read more
 reliably but you can through them away after the next backup. So I still
 don't know what is better. I suppose it depends on the backup frequency.
 The are not so many files that get changed every day or even every week,
 most files are just there like some nice pictures or old documents.

 My home directory is 2.1G so I will need at least 4 CDRs for that. Also
 /etc is also worth backing up as well as some files from /var/cache/edb.
 What else would you suggest for a backup?


 Regards,
 Renat

-- 

Brett I. Holcomb
AKA Grunt 

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-08-14 Thread Jerry McBride

My ISP provide me with a 20meg filespace that I make use of regularly. I 
compress, encrypt and upload to it nightly.

Not a lot of room... but perfect for important config data, etc. It also has 
the advantage of being accessable where ever and when ever I'm near an 
internet hookup...

For larger datasets... ATA Hard drives have never been cheaper. Either go 
external via usb or firewire or invest in removable drive mounts... It's the 
cheapest way possible, that I know of, to backup 100's of gigs of data 
quickly.


  Hi list!
 
  What is better to use for backups at home - CD-Rs, CD-RWs, another
  harddrive or something else?
 
  The standard way is to use tapes, but they are way too expensive for a
  home desktop system. Harddrives are also not that good, because I want to
  backup a harddrive in the first place, and anyway my system is already
  full so I'd have to swap harddrives or buy an external one for backup.
  And that is not really cheap also.
 
  So what do you suggest? How and how often do you make backups?
 
 
  Regards,
  Renat

-- 

**
 Registered Linux User Number 185956
  http://groups.google.com/groups?hl=ensafe=offgroup=linux
 Join me in chat at #linux-users on irc.freenode.net
This email account no longers accepts attachments or messages containing html.
11:09pm  up 30 days,  9:07,  4 users,  load average: 2.87, 2.65, 2.08


--
[EMAIL PROTECTED] mailing list



[gentoo-user] Backups

2003-08-14 Thread Renat Golubchyk
Hi list!

What is better to use for backups at home - CD-Rs, CD-RWs, another harddrive 
or something else?

The standard way is to use tapes, but they are way too expensive for a home 
desktop system. Harddrives are also not that good, because I want to backup a 
harddrive in the first place, and anyway my system is already full so I'd 
have to swap harddrives or buy an external one for backup. And that is not 
really cheap also.

So what do you suggest? How and how often do you make backups?


Regards,
Renat


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-08-14 Thread Matthias F. Brandstetter
-- quoting Peter Ruskin --
 ==
 Gentoo Linux:   Gentoo Base System version 1.4.3.9
 kernel-2.4.22_pre2-gss i686 AMD Athlon(tm) XP 1600+
 ==

Sorry, but what is Gentoo Base System version 1.4.3.9?
Has this something to do with Gentoo 1.2, 1.4_rc4, 1.4?

Greets, Matthias

-- 
Matthias F. Brandstetter [mailto:[EMAIL PROTECTED]
now playing HOUSEMUSIQUE - Deep Underground House Grooves from 
NETMUSIQUE


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-08-14 Thread Peter Ruskin
On Sunday 10 Aug 2003 03:18, Renat Golubchyk wrote:
 Hi list!

 What is better to use for backups at home - CD-Rs, CD-RWs, another
 harddrive or something else?

 The standard way is to use tapes, but they are way too expensive for
 a home desktop system. Harddrives are also not that good, because I
 want to backup a harddrive in the first place, and anyway my system
 is already full so I'd have to swap harddrives or buy an external one
 for backup. And that is not really cheap also.

 So what do you suggest? How and how often do you make backups?

Hard disks are cheap.  I have a 140GB drive dedicated to backups.  It 
currently holds 13 full backups.  I run the following script nightly as 
a cron job and can forget about it until I need to restore something:

#===
#! /bin/bash
# /usr/local/bin/backup
###
# Backup Script
###
# Jason Calabrese [EMAIL PROTECTED]
# modified by Peter Ruskin [EMAIL PROTECTED] 24-Jul-03

BACKUP_TO=/mnt/backup
HOST=$( hostname|cut -f1 -d. )

echoBackup started at `date +'%H:%M'`
echo
echoMounting boot partition...
mount /boot
echo
echoMounting backup disk...
mount $BACKUP_TO
sleep 4
echo

# Variables and calculations before backup
FILE=$BACKUP_TO/$HOST-$( date +%F-%H%M ).tar
FILE_LIST=$BACKUP_TO/$HOST-$( date +%F-%H%M ).list
EXCLUDE='--exclude --exclude /mnt/downloads/Pan --exclude /mnt/backup 
--exclude /mnt/cdrom --exclude /mnt/floppy --exclude /mnt/KROH-LIESE 
--exclude /mnt/KROH-PETER --exclude /mnt/PENGUIN --exclude /proc 
--exclude /usr/portage/distfiles --exclude /mdk90 --exclude 
/mnt/win/d/Pan --exclude /root/.ccache --exclude /home/peter/.ccache'
USEDSPACE=$( du -sh $BACKUP_TO | grep G | awk '{print $1}' | cut -f1 -dG 
)
NUMBAKUPS=$( ls $BACKUP_TO/${HOST}-*.tar | wc -w | awk '{print $1}' )
TOTALBLOCKS=$(cat /proc/partitions|grep 
ide/host0/bus1/target0/lun0/part1|awk '{print $3}')
CAPACITY=$(( $TOTALBLOCKS/1024/1024 ))
SPACELEFT=$(( $CAPACITY-$USEDSPACE ))
AVSIZE=$(( $USEDSPACE/$NUMBAKUPS ))
ESTBKUPS=$(( $CAPACITY/$AVSIZE ))
MYDATE=${ESTBKUPS} days ago
OLD_FILE=$BACKUP_TO/$HOST-$( date --date=$MYDATE +%F )

# Variables and calculations before backup
echo STATUS BEFORE BACKUP...
echoCapacity of backup partition:   ${CAPACITY}GB
echoSpace occupied by backup partition: ${USEDSPACE}GB
echoSpace left on backup partition: ${SPACELEFT}GB
echoNumber of backups:  $NUMBAKUPS
echoAverage size per backup:${AVSIZE}GB
echoEstimated total number of backups:  $ESTBKUPS
echo

# For when there's not enough space...
if [[ ${SPACELEFT} -le ${AVSIZE} ]]; then
ESTBKUPS=$(( $ESTBKUPS - 1 ))
NUMBAKUPS=$( ls $BACKUP_TO/${HOST}-*.tar | wc -w | awk '{print $1}' )
# so remove earliest
echoRemoving earliest archive - not enough space for backup...
ls $BACKUP_TO/*.tar  | sort | head -n1 | xargs rm
ls $BACKUP_TO/*.list | sort | head -n1 | xargs rm
echoNumber of backups:  $NUMBAKUPS
echoEstimated total number of backups:  $ESTBKUPS
echo
fi

if [ ls ${OLD_FILE}*  2 /dev/null ]; then
echo
echoRemoving old archive from $MYDATE...
ls ${OLD_FILE}*.tar  2 /dev/null  /bin/rm -f ${OLD_FILE}*.tar
ls ${OLD_FILE}*.list 2 /dev/null  /bin/rm -f ${OLD_FILE}*.list
fi

echo
echoPerforming backup - it'll take about half an hour...
echo
/bin/tar -cpvvf $FILE / $EXCLUDE  $FILE_LIST 2 /dev/null

echoBackup finished at `date +'%H:%M'`
echo

# Variables and calculations after backup
USEDSPACE=$( du -sh $BACKUP_TO | grep G | awk '{print $1}' | cut -f1 -dG 
)
NUMBAKUPS=$( ls $BACKUP_TO/${HOST}-*.tar | wc -w | awk '{print $1}' )
SPACELEFT=$(( $CAPACITY-$USEDSPACE ))
AVSIZE=$(( $USEDSPACE/$NUMBAKUPS ))
ESTBKUPS=$(( $CAPACITY/$AVSIZE ))
if [[ ${SPACELEFT} -le ${AVSIZE} ]]; then
ESTBKUPS=$(( $ESTBKUPS - 1 ))
# so remove earliest
echoRemoving earliest archive - not enough space for tomorrow...
ls $BACKUP_TO/*.tar  | sort | head -n1 | xargs rm
ls $BACKUP_TO/*.list | sort | head -n1 | xargs rm
echo
USEDSPACE=$( du -sh $BACKUP_TO | grep G | awk '{print $1}' | cut -f1 
-dG )
NUMBAKUPS=$( ls $BACKUP_TO/${HOST}-*.tar | wc -w | awk '{print $1}' )
SPACELEFT=$(( $CAPACITY-$USEDSPACE ))
AVSIZE=$(( $USEDSPACE/$NUMBAKUPS ))
ESTBKUPS=$(( $CAPACITY/$AVSIZE ))
fi

echo STATUS AFTER BACKUP...
echoCapacity of backup partition:   ${CAPACITY}GB
echoSpace occupied by backup partition: ${USEDSPACE}GB
echoSpace left on backup partition: ${SPACELEFT}GB
echoNumber of backups:  $NUMBAKUPS
echoAverage size per backup:${AVSIZE}GB
echoEstimated total number of backups:  $ESTBKUPS
echo

echoUnmounting boot and backup partitions...

/bin/umount -l /boot
/bin/umount -l $BACKUP_TO

echoSpinning down backup 

Re: [gentoo-user] Backups

2003-08-14 Thread Yannick Le Saint
On Sunday 10 August 2003 02:52, Renat Golubchyk wrote:
 My home directory is 2.1G so I will need at least 4 CDRs for that. Also
 /etc is also worth backing up as well as some files from /var/cache/edb.
 What else would you suggest for a backup?

 I personnally get to save
  - /etc
  - my /usr/local/* things
  - /boot (kernel configs + grub config)
  - /root
  - my $HOME dir
  - /var (i have space, but especially /var/cache/edb/world)
  - and some /data dirs i have

 with a very simple script that make entire backups for previous directory 
(tar+bz2).

 And of course an entire backup sometimes.

 This strategy has been tested (many times ...) and proved to work for me 
(it's simple, and simple is good), so i stick to it for now (i know, it takes 
*a lot* of disk space for backups, but it works ... it freaking works, and 
this has always been important when i was restoring something :) ).

 I'm just looking sometimes for taped backup but i cannot afford them at home 
...

 And i use only another box with hard drive / enough space ... and maybe 
that's the point ... + just plain cdrs for static data.

PS: please forgive my bad english :)

-- 
God must love the common man; He made so many of them.


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-08-11 Thread Renat Golubchyk
On Sunday 10 August 2003 04:31, Brett I. Holcomb wrote:
 It depends on the amount of data you have.  Hard drives and tapes can
 backup a lot of data.  However, for a home user you probably aren't backing
 up that much.  For ease of ue take a look at using a CDR or CDRW.  If you
 have more than fits on one CD then split you backups up to use more CDs. 
 You can also backup to another system's hard drive if you have space (which
 yoiu indicate you don't) but sooner or later that should be backed up to
 another media.

Yes, I figured that CDR and CDRW would be best. But there is difference also. 
CDRWs are more expensive and some CD readers read them not so reliably as 
CDRs. CDRs on the other hand are cheap, and are read more reliably but you 
can through them away after the next backup. So I still don't know what is 
better. I suppose it depends on the backup frequency. The are not so many 
files that get changed every day or even every week, most files are just 
there like some nice pictures or old documents.

My home directory is 2.1G so I will need at least 4 CDRs for that. Also /etc 
is also worth backing up as well as some files from /var/cache/edb. What else 
would you suggest for a backup?


Regards,
Renat


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-08-10 Thread Karl Huysmans
ATA disks are indeed cheep. I have given up making backups at home, I
just created a mirror, so my files are protected against disk failures.
A very good way is to have 3 identical disks and to create a
2-disk/1-spare software RAID 1. 

This will not protect you against accidental file deletion or (???)
viruses, but at least, you don' t even have to think about backups.
  

On Sun, 2003-08-10 at 06:00, Jerry McBride wrote:
 My ISP provide me with a 20meg filespace that I make use of regularly. I 
 compress, encrypt and upload to it nightly.
 
 Not a lot of room... but perfect for important config data, etc. It also has 
 the advantage of being accessable where ever and when ever I'm near an 
 internet hookup...
 
 For larger datasets... ATA Hard drives have never been cheaper. Either go 
 external via usb or firewire or invest in removable drive mounts... It's the 
 cheapest way possible, that I know of, to backup 100's of gigs of data 
 quickly.
 
 
   Hi list!
  
   What is better to use for backups at home - CD-Rs, CD-RWs, another
   harddrive or something else?
  
   The standard way is to use tapes, but they are way too expensive for a
   home desktop system. Harddrives are also not that good, because I want to
   backup a harddrive in the first place, and anyway my system is already
   full so I'd have to swap harddrives or buy an external one for backup.
   And that is not really cheap also.
  
   So what do you suggest? How and how often do you make backups?
  
  
   Regards,
   Renat
-- 
Karl Huysmans [EMAIL PROTECTED]


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-06-03 Thread Matthias F. Brandstetter
-- quoting Chris I --
 I have toyed with the idea of full backups every other week, and
 incrimental backups every few days, keeping the last full backup
 and all incrimentals since. Right now I'm working on a
 partner-based backup script along these lines using ssh and rsync.
 Don't hold your breath for me to show anyone, I'm taking my time
 writing it. There are projects out there however that do this,
 though I cannot remember their names.

You could give rdiff-backup [1] a try. It's very handy, does 
incremetal and full backups. Just write a little wrapperscript for 
cron and you're fine. I am using it since ~6 months and it works like 
a charm.

Ah yes, and it's in portage...
HTH, Matthias

footnote:
[1] http://www.stanford.edu/~bescoto/rdiff-backup

-- 
Mmm ... caramel
 - Homer Simpson


--
[EMAIL PROTECTED] mailing list



[gentoo-user] Backups

2003-06-01 Thread Ryan
I've got a small network (4 computers) here at my home (3 run linux, 1
runs win98) that I want to start doing backups on to a second hard disk in
one of the computers (I hope to burn these backups onto a cd-r disk every
week or so). What tools will do this? What would you recommend? How do you
do your backups?

I've heard about AMANDA, and while I haven't looked into it that much yet,
it sounds like overkill for my needs. I'd sure appreciate seeing your
custom backup scripts or any links you might have to get me on my way.

Ryan




--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-06-01 Thread Jason Calabrese
This is what I use.  I have a cron setup to run this script every night.  I've 
had it running for several months and it already saved me once.

Let me know if you have ant questions or suggestions.

Jason

#! /bin/bash
###
# Backup Script
###

mount /boot -o ro
mount /mnt/backup

FILE=/mnt/backup/`date +%Y-%m-%d`.tar
FILE_LIST=/mnt/backup/`date +%Y-%m-%d`.list
OLD_FILE=/mnt/backup/`date --date='3 days ago' +%Y-%m-%d`.tar
OLD_FILE_LIST=/mnt/backup/`date --date='3 days ago' +%Y-%m-%d`.list
EXCLUDE='--exclude /proc --exclude /mnt --exclude /usr/portage/distfiles'

tar -cpvvf $FILE / $EXCLUDE  $FILE_LIST

rm -f $OLD_FILE
rm -f $OLD_FILE_LIST

umount /boot
umount /mnt/backup

hdparm -y /dev/hdb

On Saturday 31 May 2003 03:24 pm, Ryan wrote:
 I've got a small network (4 computers) here at my home (3 run linux, 1
 runs win98) that I want to start doing backups on to a second hard disk in
 one of the computers (I hope to burn these backups onto a cd-r disk every
 week or so). What tools will do this? What would you recommend? How do you
 do your backups?

 I've heard about AMANDA, and while I haven't looked into it that much yet,
 it sounds like overkill for my needs. I'd sure appreciate seeing your
 custom backup scripts or any links you might have to get me on my way.

 Ryan




 --
 [EMAIL PROTECTED] mailing list


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-06-01 Thread Peter Ruskin
On Sunday 01 Jun 2003 01:15, Jason Calabrese wrote:
 #! /bin/bash
 ###
 # Backup Script
 ###

 mount /boot -o ro
 mount /mnt/backup

 FILE=/mnt/backup/`date +%Y-%m-%d`.tar
 FILE_LIST=/mnt/backup/`date +%Y-%m-%d`.list
 OLD_FILE=/mnt/backup/`date --date='3 days ago' +%Y-%m-%d`.tar
 OLD_FILE_LIST=/mnt/backup/`date --date='3 days ago' +%Y-%m-%d`.list
 EXCLUDE='--exclude /proc --exclude /mnt --exclude
 /usr/portage/distfiles'

 tar -cpvvf $FILE / $EXCLUDE  $FILE_LIST

 rm -f $OLD_FILE
 rm -f $OLD_FILE_LIST

 umount /boot
 umount /mnt/backup

 hdparm -y /dev/hdb

Hi Jason,

I like your script, but have one reservation.  It seems ideal to 
completely restore, for example, yesterday's backup; but with such a 
big tarball it will be very difficult to restore one or two small 
files.  I do something similar on many smaller chunks of the 
filesystem.

Peter


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Backups

2003-06-01 Thread Chris I
On 2003.05.31 21:24, Peter Ruskin wrote:
On Sunday 01 Jun 2003 01:15, Jason Calabrese wrote:
 #! /bin/bash
 ###
 # Backup Script
 ###

 mount /boot -o ro
 mount /mnt/backup

 FILE=/mnt/backup/`date +%Y-%m-%d`.tar
 FILE_LIST=/mnt/backup/`date +%Y-%m-%d`.list
 OLD_FILE=/mnt/backup/`date --date='3 days ago' +%Y-%m-%d`.tar
 OLD_FILE_LIST=/mnt/backup/`date --date='3 days ago'
+%Y-%m-%d`.list
 EXCLUDE='--exclude /proc --exclude /mnt --exclude
 /usr/portage/distfiles'

 tar -cpvvf $FILE / $EXCLUDE  $FILE_LIST

 rm -f $OLD_FILE
 rm -f $OLD_FILE_LIST

 umount /boot
 umount /mnt/backup

 hdparm -y /dev/hdb
Hi Jason,

I like your script, but have one reservation.  It seems ideal to
completely restore, for example, yesterday's backup; but with such a
big tarball it will be very difficult to restore one or two small
files.  I do something similar on many smaller chunks of the
filesystem.
It's not difficult to restore one or two files. Doing a --list with 
some grep magic would get you the name of the files (if you dont 
remember them), then you could extract those two files specifically.

The only problem I see is using such large tarballs. A whole system 
tarball could be rather bulky, and storing full systems for multiple 
machines could likewise be a problem.

For home machines i would reccommend not backing up *everything*. 
downtime isnt a huge issue for most home computers (especially since 
the person in question has four), but storage is (he said he wanted to 
burn to cd). What I usually do is rather than back up everything 
excluding certain places, I only back up what needs to be backed up. 
Usually you should be fine backing up /etc and /home, and rebuilding 
the rest of the system.

I have toyed with the idea of full backups every other week, and 
incrimental backups every few days, keeping the last full backup and 
all incrimentals since. Right now I'm working on a partner-based backup 
script along these lines using ssh and rsync. Don't hold your breath 
for me to show anyone, I'm taking my time writing it. There are 
projects out there however that do this, though I cannot remember their 
names.

Essentially, you (you being Ryan, not neccessarily Peter) would need 
to figure out what works best for you, based on how much storage space 
you have availiable, how fast the machines are (if you were to back up 
the whole system, I'm sure 'tar cz' would take quite a while on slower 
machines...) and how much time you have to do it (...but thats not 
really an issue at 2am)

As for the windows machine, i cannot really suggest anything.

-Chris I

I fill MY industrial waste containers with old copies of the 
WATCHTOWER
and then add HAWAIIAN PUNCH to the top ...  They look NICE in the yard 
...

pgp0.pgp
Description: PGP signature


Re: [gentoo-user] Backups

2003-06-01 Thread Jason Calabrese
  I like your script, but have one reservation.  It seems ideal to
  completely restore, for example, yesterday's backup; but with such a
  big tarball it will be very difficult to restore one or two small
  files.  I do something similar on many smaller chunks of the
  filesystem.

They're getting pretty big I'm up to 19 GB now.  Size hasn't been a big 
problem.  I have an 80GB drive that I use only for backups, that lets me keep 
3 full backups at a time.

 I have toyed with the idea of full backups every other week, and
 incrimental backups every few days, keeping the last full backup and
 all incrimentals since. 

I'd like to have something like that setup, but I haven't had time to play 
with it.

Jason

--
[EMAIL PROTECTED] mailing list