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

Re: hot-backup.py bug?

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

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=2399983

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

attached mail follows:


  • message/rfc822 attachment: 1.eml
Received on 2009-09-24 22:26:44 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.