You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Oftenwrong Soong <of...@yahoo.com> on 2011/01/17 20:34:22 UTC
hot-backup.py question
Hi all,
I want to automatically backup my repository once per day. The Subversion book
pointed me to svnadmin hotcopy and to the Python script hot-backup.py.in, which
is found under tools/backup/ in the source tarball.
Why is the file called hot-backup.py.in and not simply hot-backup-py? Does the
".in" indicate that this is an include file for a larger Python script
somewhere? (I'm asking because I do not know Python.)
Also, where can I find information on how to use this script?
In case it matters, I am using subversion-1.6.15.
Thanks,
Soong
Re: hot-backup.py question
Posted by Oftenwrong Soong <of...@yahoo.com>.
On Mon, January 17, 2011 1:34:24 PM, Ryan
Schmidt <su...@ryandesign.com> wrote:
> ".in" is not anything to do with python specifically; it means that
> it is a template file, and that a process (typically a Makefile or
> a configure script) will replace some placeholders in that template
> with actual values in order to transform it into a real usable
> program.
>
> In the case of hot-backup.py.in, the only placeholder seems to be
> "@SVN_BINDIR@" which occurs twice near the top of the script. If
> you like, you can bypass the usual process and replace the
> placeholders with the correct values manually.
Thank you for this explanation. It cleared up a bit on confusion on my part. I
copied the file, removed the ".in" from the filename, replaced the two
@SVN_BINDIR@ references with the absolute path, and it appears to do what it's
supposed to.
Meanwhile, I found a nice HOWTO for setting up cron to run this script:
http://www.question-defense.com/2009/12/20/backing-up-subversion-repositories-using-hot-backup-py
Re: hot-backup.py question
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 17, 2011, at 13:34, Oftenwrong Soong wrote:
> Why is the file called hot-backup.py.in and not simply hot-backup-py? Does the
> ".in" indicate that this is an include file for a larger Python script
> somewhere? (I'm asking because I do not know Python.)
".in" is not anything to do with python specifically; it means that it is a template file, and that a process (typically a Makefile or a configure script) will replace some placeholders in that template with actual values in order to transform it into a real usable program.
In the case of hot-backup.py.in, the only placeholder seems to be "@SVN_BINDIR@" which occurs twice near the top of the script. If you like, you can bypass the usual process and replace the placeholders with the correct values manually.