#!/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
» Subscribe to a RSS feed of y... in apache php mysql find awk email lighttpd ruby rails ssh date perl regex shell textpattern svn osx mac css python google html bash subversion backup script sql javascript dom expressionengine java flash actionscript rubyonrails unix linux applescript cli c ajax image xml terminal file web sed list delphi administration directory
» Subscribe to a RSS feed of y... in apache php mysql find awk email lighttpd ruby rails ssh date perl regex shell textpattern svn osx mac css python google html bash subversion backup script sql javascript dom expressionengine java flash actionscript rubyonrails unix linux applescript cli c ajax image xml terminal file web sed list delphi administration directory
» 6144 users tagging and stori... in apache php mysql find awk email lighttpd ruby rails ssh date perl regex shell textpattern svn osx mac css python google html bash subversion backup script sql javascript dom expressionengine java flash actionscript rubyonrails unix linux applescript cli c ajax image xml terminal file web sed list delphi administration directory
» Using this function you will... in apache php mysql find awk email lighttpd ruby rails ssh date perl regex shell textpattern svn osx mac css python google html bash subversion backup script sql javascript dom expressionengine java flash actionscript rubyonrails unix linux applescript cli c ajax image xml terminal file web sed list delphi administration directory
» Mount Strongspace to a folde... in backup strongspace ubuntu fuse mount folder
» SVNnotify post-commit hook in subversion postcommit hooks svnnotify
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails