Index: [Article Count Order] [Thread]

Date:  Sat, 22 Dec 2007 10:33:16 +0100
From:  Kristian Eklund <kristian.eklund (at mark) monostar.net>
Subject:  [coba-e:11599] Re: backup script help
To:  coba-e (at mark) bluequartz.org
Message-Id:  <476CD9DC.8000602 (at mark) monostar.net>
In-Reply-To:  <476CCC27.1050501 (at mark) mixfans.org>
References:  <015e01c840d1$ffa75cc0$6400a8c0 (at mark) HPPAVILION> <006301c843cd$07047b30$e5b418ac (at mark) dell> <018501c843ea$8b251290$6400a8c0 (at mark) HPPAVILION> <476CCC27.1050501 (at mark) mixfans.org>
X-Mail-Count: 11599

Hi Dennis,

> So I think that the script is not okay for this as the workdir has to be 
> the server itself.

This is logical, yes.

> But nowhere I see in the script a way to alter the default store path to 
> be the path of my NAS

Try the first uncommented line in raqbackup.sh

# source configuration:

WORKDIR="/full/path/to/dir"

> So backup can be stored first locally on the server to use the processor 
> and than moved to the mounted nas

RAQbackup only support to transfer a backup using FTP. If this is on the 
same segmented network it's OK. But I wouldn't send backups unencrypted 
over Internet.

What I think you should do is create a cron-script that runs in mid-day 
(giving your backup several hours to complete on..)

$ su -
# cd
# nano -w backupcopy.sh

-----------------------
#?/bin/bash
mount XXX.XXX.XXX.XXX:/path/on/NAS/where/you/want/the/backup /mnt/nas
cd /mnt/nas
mkdir `date +%Y%m%d`
copy -r /home/backup/data /* /mnt/nas
umount /mnt/nas
-----------------


The mount command is specific to NFS.. I think. If you always have your 
NAS mounted on your RAQ (using fstab) remove the mount and umount lines.


# crontab -e
-------------------------
5 12 * * * /root/backupcopy.sh
------------

# crontab -l (to see the cron)

This script will run at 12:05 and root will recieve a mail about it. If 
you don't want any mails, add > /dev/null 2>&1 after the command in crontab.


There you go, this should be everything you need.

Merry Christmas,
Kristian

11599_2.p7s