[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Taking a nightly snapshot with cron

From: Brent Webster <brent.webster_at_liquidcomputing.com>
Date: 2005-09-28 16:20:06 CEST

Here's my setup running cron have my RHEL4 box under the svnadmin
account which owns the svn "swrepos" repository. No wrapper scripts just
direct invokations. Here's the contents of svnadmin's "crontab -l"
output. No prompting for passwords, etc:

# Monday thru Saturday daily backup of s/w repository
#
0 23 * * 1-6 /bin/bash -c
"/usr/local/svnadmin/tools/backup/hot-backup.py
/usr/local/svnadmin/swrepos ~svnadmin/swrepos-daily >/dev/null"
#
# Sunday night weekly backup of s/w repository
#
0 23 * * 0 /bin/bash -c "/usr/local/svnadmin/tools/backup/hot-backup.py
/usr/local/svnadmin/swrepos ~svnadmin/swrepos-weekly >/dev/null"
#
# cleanup the old daily s/w repository backups that are older than 7
days
#
30 23 * * 1-6 /bin/bash -c "find /home/svnadmin/swrepos-daily -type d
-maxdepth 1 -mtime +7 -exec rm -rf {} \;"

---
Brent x224
 
>>-----Original Message-----
>>From: Jeff Lanzarotta [mailto:delux256-subversion@yahoo.com] 
>>Sent: September 28, 2005 9:54 AM
>>To: Subversion Mailing List
>>Subject: Taking a nightly snapshot with cron
>>
>>Hello,
>>
>>I'm running subversion 1.2.3 on SuSE Linus 9.3. svnserve is 
>>running through xinetd under the user 'svn'.
>>
>>Ok, what I'm trying to do is create a nightly snapshot of a 
>>repository using a script running through cron.
>>
>>The script is very simple. It looks like:
>>
>>----------8<----------
>>
>>#!/bin/sh
>>/usr/local/bin/svn update /mnt/winnt/LatestAndGreatest/"
>>
>>----------8<----------
>>
>>Well the problem that I have when trying to run this script 
>>is that it requires that I enter a password for 'root'... 
>>Here is the output:
>>
>>----------8<----------
>>
>>suse:/media/hdc1/scripts # ./latestWindss Retrieving the 
>>latest and greatest Win/DSS version...
>>/mnt/winnt/LatestAndGreatest/ 0 1024 517b 1534176 81152 81152 
>>4096 0 0 Authentication realm: <svn://suse:3690> WinDSS 
>>Repository Password for 'root':
>>
>>----------8<----------
>>
>>Since cron is running these jobs as 'root', I guess that is 
>>why svnserve is requesting 'root's password...
>>
>>Is there anyway of automating this to not ask for a password? 
>>Or, is there a better way of doing this? All I want is a 
>>nightly snapshot of a respository... Any ideas?
>>
>>Regards,
>>
>>-Jeff
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>>For additional commands, e-mail: users-help@subversion.tigris.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 28 16:22:41 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.