Koozali.org: home of the SME Server

Backup2ws - store backups in subfolder / subdirectory ?

Offline dmajwool

  • *****
  • 180
  • +0/-0
Backup2ws - store backups in subfolder / subdirectory ?
« on: July 18, 2006, 01:37:32 PM »
Hi.

I have backup2 working OK on SME 7.0 full.  I want to store backups from a few servers onto one backup SME server.

On the backup server I have made an ibay called backups.

I can make backups onto this ibay by entering //backupserver/backups in the destination folder field in the source machine.

All OK so far, but I wonder can anyone suggest how I might post the backups to a sub directory //backupserver/backups/sourceserverA

That way, I can setup other source servers to backup to //backupserver/backups/sourceserverB  , C,  D and so on.

Simply entering //backupserver/backups/sourceserverA is not supported.  I tried that :-)

Thanks, David.

Offline jfarschman

  • *
  • 406
  • +0/-0
Backup2ws - store backups in subfolder / subdirectory ?
« Reply #1 on: July 18, 2006, 04:15:27 PM »
You will have to mount the external location first before you can copy.  You can do that will a little script like this.

Code: [Select]

#!/bin/sh
# This batch file backs up the data from SHARE
# -------------SCRIPT VARIABLES---------------
SHARE="//192.168.1.4/Jobs"
BACKUPDESTINATION="/home/e-smith/files/users/ibayname/files/location"
BACKUPSOURCE="/mnt/Jobs/IAdmin?-?2005068/200-DesignDocuments/I-Admin/Constructs"
SMBMP="/mnt/Jobs/"
USERNAME="the_username"
PASSWD="the_password"

# -------------------------------------------------
export PASSWD;
echo 'Connecting to Remote Server and syncing data.....May take a minute.......'
smbumount $SMBMP
smbmount $SHARE $SMBMP username=$USERNAME password=$PASSWD
echo 'Connected to Remote Server'
rsync -aur $BACKUPSOURCE $BACKUPDESTINATION
smbumount $SMBMP
echo 'Finished'
#--------------------------------------------------


I am sorry it's not very pretty, but it should work.  I just wrote it a few minutes ago to solve the same problem.  This script uses rsync to copy only the files that changed since the last backup.

Another method is to use backuppc which can mount the external windows shares for you.  It's a little complicated, but there is a nice contrib that is making it easier:

http://forums.contribs.org/index.php?topic=32089.0

Be sure to get the latest code.
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline dmajwool

  • *****
  • 180
  • +0/-0
Backup2ws - store backups in subfolder / subdirectory ?
« Reply #2 on: July 18, 2006, 04:33:35 PM »
Thanks Jay.

I'll explore both those ideas.

David.

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Backup2ws - store backups in subfolder / subdirectory ?
« Reply #3 on: July 19, 2006, 04:42:04 AM »
dmajwool

> On the backup server I have made an ibay called backups.

Simple answer is to create multiple backup ibays eg
backupserverA
backupserverB
backupserverC
etc
...