[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zaurus-chatter
Subject:    Re: [Zaurus-chatter] busy reboots
From:       Robert Towster <robert () towster ! com>
Date:       2002-08-09 2:47:40
[Download RAW message or body]

I have a script that I run daily from my linux box to backup all files
on my Z.. It backs up my SD card but I dont have it backing up a CF card
(since I dont use one.. but it can easly be added..)

The backups it makes (of the /home partition at least) are identical to
the built in OS backups..
------------Backup script-----------------
#!/bin/sh

ZHOST=zaurus

# this is where the backups will be saved.
BACKUPDIR="/home/zaurus/backups"
BACKUPFILE=$BACKUPDIR/`date +%Y-%m-%d-%H-%M`.backup
LOG=$BACKUPDIR/`date +%Y-%m-%d-%H-%M`.backup.log
LASTLOG=`ls -tr $BACKUPDIR/*.log | tail -1`
KEEP=14

ssh -l root $ZHOST 'cd /;tar cf - --exclude home/tmp home usr/mnt.rom/card' > $BACKUPFILE
if [ -s $BACKUPFILE ]; then
   tar -tvf $BACKUPFILE > $LOG
#  diff $LASTLOG $LOG

   ## remove old backups
   COUNT=`ls -tr $BACKUPDIR/*.backup | wc -l`
   TOP=`echo $COUNT - $KEEP | bc`
   for FILE in `ls -tr $BACKUPDIR/*.backup | head -$TOP` ; do
     rm $FILE
   done

   COUNT=`ls -tr $BACKUPDIR/*.log | wc -l`
   TOP=`echo $COUNT - $KEEP | bc`
   for FILE in `ls -tr $BACKUPDIR/*.log | head -$TOP` ; do
     rm $FILE
   done
else
   # bad backup.. trash it
   rm $BACKUPFILE
fi
-------------------------------------------------------------


Mark Komarinski wrote:
> On Wed, Aug 07, 2002 at 08:23:28AM +0200, Jesper K. Pedersen wrote:
> 
>>"Bill Burton" <mildness@earthlink.net> writes:
>>
>>| >    2. comeplete lock up after reboot (Jesper K. Pedersen)
>>| 
>>| You need to press the reset button which is right under the battery door.
>>| You will not need to remove the battery to do this.
>>That restarted the Z, but all my data are gone :-/
> 
> 
> Note (I just learned this the hard way):
> 
> backup/restore does NOT back up cf or mmc/sd devices, only the main memory.
> 
> I went to reformat my mmc card to ext2, but lost everything that was
> there.  Fortunately, I can rebuild a lot of it.  but OUCH!
> 
> -Mark
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Zaurus-chatter mailing list
> Zaurus-chatter@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/zaurus-chatter




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Zaurus-chatter mailing list
Zaurus-chatter@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zaurus-chatter
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic