<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Subversion (SVN):  How do you set up backup for your Subversion repositories?</title>
	<atom:link href="http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/feed/" rel="self" type="application/rss+xml" />
	<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/</link>
	<description>Enterprise level solutions, LAMP, Linux, Apache, MySQL, PHP, Perl, Windows, Cache, Optimization</description>
	<lastBuildDate>Mon, 06 Sep 2010 15:32:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Lucas Magasweran</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-892</link>
		<dc:creator>Lucas Magasweran</dc:creator>
		<pubDate>Tue, 03 Nov 2009 16:38:27 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-892</guid>
		<description>Thanks for the script, I&#039;ve made some modifications I&#039;d like to share (protect filenames with spaces by using quotes, use of set -e, backup to samba share, modified ls in repository path to only list directories, etc...). This script runs from the cron.daily folder.

#!/bin/bash 
# Based on http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/
# Modified by Lucas Magasweran on 2009/11/02
#
# Script to create rotating hotcopy backups of all SVN repositories to a SMB share.

# Exit if any command returns a non-true value
set -e
#set -o errexit

# Paths, no trailing slash required
SHARE_PATH=//server/share
BACKUP_PATH=/mnt/svn-backup
SVN_REPOS_PATH=/svn/repositories

# Mount the backup directory
if [ $(mount &#124; grep -c $BACKUP_PATH) -eq 0 ] ; then
  smbmount $SHARE_PATH $BACKUP_PATH -o user=username,pass=password,dom=DOMAIN &#124;&#124; exit 1
  echo &quot;$BACKUP_PATH is now mounted&quot;
else
  echo &quot;$BACKUP_PATH already mounted&quot;
fi

# Perform backup using svn hotcopy backup script
for repostobackup in `ls -d $SVN_REPOS_PATH/*/` ; do
  filename=`basename &quot;${repostobackup}&quot;`
  if [ ! &quot;$filename&quot; = &quot;&quot; ] ; then
    svn-hot-backup --archive-type=bz2 --num-backups=1 $SVN_REPOS_PATH/&quot;${filename}&quot; $BACKUP_PATH
  fi
done

# Un-mount the backup directory
smbumount $BACKUP_PATH
if [ $(mount &#124; grep -c $BACKUP_PATH) -eq 0 ] ; then
  echo &quot;$BACKUP_PATH is no longer mounted&quot;
else
  echo &quot;$BACKUP_PATH is still mounted&quot;
fi</description>
		<content:encoded><![CDATA[<p>Thanks for the script, I&#8217;ve made some modifications I&#8217;d like to share (protect filenames with spaces by using quotes, use of set -e, backup to samba share, modified ls in repository path to only list directories, etc&#8230;). This script runs from the cron.daily folder.</p>
<p>#!/bin/bash<br />
# Based on <a href="http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/" rel="nofollow">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/</a><br />
# Modified by Lucas Magasweran on 2009/11/02<br />
#<br />
# Script to create rotating hotcopy backups of all SVN repositories to a SMB share.</p>
<p># Exit if any command returns a non-true value<br />
set -e<br />
#set -o errexit</p>
<p># Paths, no trailing slash required<br />
SHARE_PATH=//server/share<br />
BACKUP_PATH=/mnt/svn-backup<br />
SVN_REPOS_PATH=/svn/repositories</p>
<p># Mount the backup directory<br />
if [ $(mount | grep -c $BACKUP_PATH) -eq 0 ] ; then<br />
  smbmount $SHARE_PATH $BACKUP_PATH -o user=username,pass=password,dom=DOMAIN || exit 1<br />
  echo &#8220;$BACKUP_PATH is now mounted&#8221;<br />
else<br />
  echo &#8220;$BACKUP_PATH already mounted&#8221;<br />
fi</p>
<p># Perform backup using svn hotcopy backup script<br />
for repostobackup in `ls -d $SVN_REPOS_PATH/*/` ; do<br />
  filename=`basename &#8220;${repostobackup}&#8221;`<br />
  if [ ! "$filename" = "" ] ; then<br />
    svn-hot-backup &#8211;archive-type=bz2 &#8211;num-backups=1 $SVN_REPOS_PATH/&#8221;${filename}&#8221; $BACKUP_PATH<br />
  fi<br />
done</p>
<p># Un-mount the backup directory<br />
smbumount $BACKUP_PATH<br />
if [ $(mount | grep -c $BACKUP_PATH) -eq 0 ] ; then<br />
  echo &#8220;$BACKUP_PATH is no longer mounted&#8221;<br />
else<br />
  echo &#8220;$BACKUP_PATH is still mounted&#8221;<br />
fi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-847</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Wed, 20 May 2009 15:20:41 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-847</guid>
		<description>ok i see the problem the &quot;-&quot; before the archive-type parameter is adouble minus and not a single 1 as it shows.

should be &quot;-&quot;&quot;-&quot;archive-type=bz2

best,

Sean</description>
		<content:encoded><![CDATA[<p>ok i see the problem the &#8220;-&#8221; before the archive-type parameter is adouble minus and not a single 1 as it shows.</p>
<p>should be &#8220;-&#8221;"-&#8221;archive-type=bz2</p>
<p>best,</p>
<p>Sean</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-846</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Wed, 20 May 2009 15:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-846</guid>
		<description>hello

i found an error in the script you provided:

this line: hot-backup.py –archive-type=bz2
should be: hot-backup.py --archive-type=bz2

and it will work good

thank you very much for all the help! this is a very good script!

btw, anyone can maybe add to the script how to upload those files through ftp?

thanks

Sean.</description>
		<content:encoded><![CDATA[<p>hello</p>
<p>i found an error in the script you provided:</p>
<p>this line: hot-backup.py –archive-type=bz2<br />
should be: hot-backup.py &#8211;archive-type=bz2</p>
<p>and it will work good</p>
<p>thank you very much for all the help! this is a very good script!</p>
<p>btw, anyone can maybe add to the script how to upload those files through ftp?</p>
<p>thanks</p>
<p>Sean.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: velmurugan</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-819</link>
		<dc:creator>velmurugan</dc:creator>
		<pubDate>Wed, 18 Mar 2009 10:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-819</guid>
		<description>Hi,

i am getting below the error.

Berkeley DB error for filesystem E:/SubversionRepository/db while opening &#039;nodes&#039; table:No such file or directory.

How to fix this.please help me.

Thanks,
Velmurugan.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i am getting below the error.</p>
<p>Berkeley DB error for filesystem E:/SubversionRepository/db while opening &#8216;nodes&#8217; table:No such file or directory.</p>
<p>How to fix this.please help me.</p>
<p>Thanks,<br />
Velmurugan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Britto I</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-579</link>
		<dc:creator>Britto I</dc:creator>
		<pubDate>Tue, 22 Jan 2008 07:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-579</guid>
		<description>Thanks a lot.I am testing it now.</description>
		<content:encoded><![CDATA[<p>Thanks a lot.I am testing it now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CrazyToon</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-578</link>
		<dc:creator>CrazyToon</dc:creator>
		<pubDate>Tue, 22 Jan 2008 06:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-578</guid>
		<description>As long as you can recover from your backup, I don&#039;t see why it wouldn&#039;t work.  You should still test the recovery process to make sure if needed, you can recover from disaster.</description>
		<content:encoded><![CDATA[<p>As long as you can recover from your backup, I don&#8217;t see why it wouldn&#8217;t work.  You should still test the recovery process to make sure if needed, you can recover from disaster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Britto I</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-574</link>
		<dc:creator>Britto I</dc:creator>
		<pubDate>Thu, 17 Jan 2008 15:05:25 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-574</guid>
		<description>Folks:

 I am backing up My SVN Repo through SAMBA Share and using my Tape Driver which is connected to my windows.

I never checked the &quot;Reliability &quot; of backup still.

Is that will work ..

----
Britto</description>
		<content:encoded><![CDATA[<p>Folks:</p>
<p> I am backing up My SVN Repo through SAMBA Share and using my Tape Driver which is connected to my windows.</p>
<p>I never checked the &#8220;Reliability &#8221; of backup still.</p>
<p>Is that will work ..</p>
<p>&#8212;-<br />
Britto</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cynthia</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-554</link>
		<dc:creator>Cynthia</dc:creator>
		<pubDate>Tue, 18 Dec 2007 15:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-554</guid>
		<description>Yes. I have two demo1 and demo2 which has all the following sub folders:

/svn/demo1
/svn/demo2

When run the following script I get the following output:

demo1 demo2
: No such file or directory


Here is Script:

mkdir /backups/repos -p
for repostobackup in ‘ls /svn/’ ; do
filename=basename ${repostobackup}
hot-backup.py –archive-type=bz2 /svn/${filename} /backups/repos
done</description>
		<content:encoded><![CDATA[<p>Yes. I have two demo1 and demo2 which has all the following sub folders:</p>
<p>/svn/demo1<br />
/svn/demo2</p>
<p>When run the following script I get the following output:</p>
<p>demo1 demo2<br />
: No such file or directory</p>
<p>Here is Script:</p>
<p>mkdir /backups/repos -p<br />
for repostobackup in ‘ls /svn/’ ; do<br />
filename=basename ${repostobackup}<br />
hot-backup.py –archive-type=bz2 /svn/${filename} /backups/repos<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CrazyToon</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-553</link>
		<dc:creator>CrazyToon</dc:creator>
		<pubDate>Tue, 18 Dec 2007 08:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-553</guid>
		<description>Do you have your repository installed under /svn/ ?</description>
		<content:encoded><![CDATA[<p>Do you have your repository installed under /svn/ ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cynthia</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-552</link>
		<dc:creator>Cynthia</dc:creator>
		<pubDate>Tue, 18 Dec 2007 07:35:17 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-552</guid>
		<description>I am getting same error &#039;No such file or directory&#039; when directly run the hot-backup.py.

Do I need to make any changes to the hot-backup.py? Or anything wrong with script?</description>
		<content:encoded><![CDATA[<p>I am getting same error &#8216;No such file or directory&#8217; when directly run the hot-backup.py.</p>
<p>Do I need to make any changes to the hot-backup.py? Or anything wrong with script?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cynthia</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-551</link>
		<dc:creator>Cynthia</dc:creator>
		<pubDate>Tue, 18 Dec 2007 06:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-551</guid>
		<description>Hi, 

I tried to run the backup script and getting the following error &#039;No such file or directory&#039;. Can you please tell me what is wrong with the script? I have the hot-backup.py in the path.

Output for :./svn_backup.sh
demo1  demo2
: No such file or directory

Script (svn_backup.sh):

mkdir /backups/repos -p
for repostobackup in &#039;ls /svn/&#039; ; do
filename=basename ${repostobackup}
hot-backup.py --archive-type=bz2 /svn/${filename} /backups/repos
done</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I tried to run the backup script and getting the following error &#8216;No such file or directory&#8217;. Can you please tell me what is wrong with the script? I have the hot-backup.py in the path.</p>
<p>Output for :./svn_backup.sh<br />
demo1  demo2<br />
: No such file or directory</p>
<p>Script (svn_backup.sh):</p>
<p>mkdir /backups/repos -p<br />
for repostobackup in &#8216;ls /svn/&#8217; ; do<br />
filename=basename ${repostobackup}<br />
hot-backup.py &#8211;archive-type=bz2 /svn/${filename} /backups/repos<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CrazyToon</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-324</link>
		<dc:creator>CrazyToon</dc:creator>
		<pubDate>Fri, 19 Oct 2007 21:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-324</guid>
		<description>You would unzip the appropriate directory.  It will unzip into same structure as your current repository.</description>
		<content:encoded><![CDATA[<p>You would unzip the appropriate directory.  It will unzip into same structure as your current repository.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jenny</title>
		<link>http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-repositories/comment-page-1/#comment-322</link>
		<dc:creator>Jenny</dc:creator>
		<pubDate>Wed, 17 Oct 2007 08:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/2007/08/16/subversion-svn-how-do-you-set-up-backup-for-your-subversion-reposiotries/#comment-322</guid>
		<description>How do you restore the backup repository?</description>
		<content:encoded><![CDATA[<p>How do you restore the backup repository?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
