#!/usr/local/bin/bash # # Author: Jacques Marneweck <jacques@php.net> # License: http://www.php.net/license/3_0.txt PHP License v3.0 # http://www.powertrip.co.za/ LOCALVER=`/usr/local/bin/svnlook youngest /home/svn/livejournal` REMOTEVER=`/usr/bin/ssh jacques@hostname /usr/local/bin/svnlook youngest /home/svn/livejournal` echo "Local version is ${LOCALVER}" echo "Remote version is ${REMOTEVER}" if [ "$REMOTEVER" -gt "$LOCALVER" ]; then echo "Remote version is greater than local version" START=$(echo "${LOCALVER} + 1" | /usr/bin/bc -l) /usr/bin/ssh jacques@hostname /usr/local/bin/svnadmin dump --incremental --deltas --revision ${START}:${REMOTEVER} /path/to/repo | /usr/local/bin/svnadmin load --ignore-uuid /path/to/repo else echo "Both local and remote version have the same data" fi
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Backing up subversion repositories from a remote machine (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Switching a working copy wit... in textpattern subversion
» Mount Strongspace to a folde... in backup strongspace ubuntu fuse mount folder
» SVNnotify post-commit hook in subversion postcommit hooks svnnotify
» Make a backup of all tables ... in mysql shell backup
» knowning how many commits it... in svn subversion
» stop creating useless .ds_st... in osx subversion webdav
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails