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

Re: problem: hot-backup failing with access denied error

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-11-14 18:21:39 CET

On Tue, 14 Nov 2006, Norbert Unterberg wrote:

> Hi,
>
> We are running svn 1.3.2 on Windows. For backup we run hot-backup on
> our repositories. Unfortunately hot-backup is failing to delete the
> outdated FSFS repositores from the backup folder. The error is:
>
> Removing old backup: \\dbtinstall\dba-backup\SVN-Backup_new\svn\dc-0
> Traceback (most recent call last):
> File "d:\Repos\hot-backup.py", line 151, in ?
> shutil.rmtree(old_backup_subdir)
> File "d:\programme\python23\lib\shutil.py", line 142, in rmtree
> raise exc[0], (exc[1][0], exc[1][1] + ' removing '+arg)
> OSError: [Errno 13] Permission denied removing
> \\dbtinstall\dba-backup\SVN-Backup_new\svn\dc-0\db\format
>
> Analysis shows:
> * the db\format file is write protected on all our repositories
> * hot-backup.py keeps the write protect flag when performing the copy
> * The shutil.rmtree(old_backup_subdir) command in hot-backup.py fails
> because the file is write protected.
>
> This is not a permission error; the script works fine if I manually
> remove the "w" flag from all files.

Norbert, are any other files in your repository backup area
write-protected?

> I do not speak enough python to know how to deal with this.
> Any ideas?

We either need to a) remove the write protection from the write
protected files before removing the old backup area or b) use a
Windows Python API which can ignore the write protection.

  • application/pgp-signature attachment: stored
Received on Tue Nov 14 18:33:55 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.