You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Sandy Pérez <sp...@yahoo.es> on 2009/09/24 20:39:02 UTC
Re[2]: hot-backup.py bug?
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@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2399990
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].