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

Re[2]: hot-backup.py bug?

From: Sandy Pérez <sperezgonza_at_yahoo.es>
Date: Thu, 24 Sep 2009 22:39:02 +0200

Hello,

I’ve enclosed a possible patch to this e-mail. The patch works for me,
however, be careful it needs some testing.

The modified and/or added code is between the following comments

######################################################################
############# PATCH

... new and changed code

############# END PATCH
######################################################################

IMPORTANT: I’ve modified the hot-backup.py included in Subversion
version 1.5.4. The script for more recent versions (i.e. 1.6.x) is a
bit different, however, the bug still exists. So, following my patch
as guideline, it’ll easy to change the script for the most recent version.

Regards,
    Sandy

> Hello,

> I’m sorry this bug is already in the bug tracker as "svnlook youngest
> race"

> http://subversion.tigris.org/issues/show_bug.cgi?id=1567

> A solution could be to change the order of calls. For example, we can
> call "svnadmin hotcopy" firstly using a temporal backup path...

> svnadmin hotcopy REPO_DIR /BACKUPS_DIR/tmp_backup

> And now, we can call the "svnlook youngest" command on the temporal
> backup pat...

> svnlook youngest /BACKUPS_DIR/tmp_backup

> Then, calculate the next available backup path using the result
> returned by "svnlook youngest" and rename /BACKUPS_DIR/tmp_backup to /BACKUPS_DIR/CALCULATED_NAME

> Doing this, we can be sure that the revision backed up in BACKUP-30 is
> the revision number 30.

> Regards,
> Sandy

>> Hello,

>> Looking at hot-backup.py code, I realized that the script calculates
>> the next available backup path using the result returned by "svnlook
>> youngest". For example, if "svnlook youngest" returns 30, a possible
>> backup path could be /BACKUPS_DIR/My_Repo-30

>> After having calculated the next available backup path, then the
>> script calls the "svnadmin hotcopy ..." command. For example, "svnadmin
>> hotcopy REPO_DIR /BACKUPS_DIR/My_Repo-30". This works fine. The backup
>> will be created, however, to suppose the last backed up revision is
>> the revision number 30 could be and error.

>> Suppose we run the hot-backup.py script. The script will calculate the
>> next available backup path basing on result returned by "svnlook
>> youngest". For example, /BACKUPS_DIR/My_Repo-30. However, while
>> calculating the next available backup path someone runs the "svn
>> commit" command. Now, the youngest revision will be the 31th. But,
>> hot-backup.py will call the "svnadmin hotcopy" command as follows:

>> svnadmin hotcopy REPO_DIR /BACKUPS_DIR/My_Repo-30.

>> That is, in My_Repo-30, we will have a backup of the 31th revision.

>> Is this a bug?

>> Best Regards,
>> Sandy

>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2399222

>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe_at_subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2399990

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].

Received on 2009-09-24 22:40:02 CEST

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.