You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Curtis Spencer <th...@gmail.com> on 2004/11/03 02:09:40 UTC

hot-backup.py permissions issue

Hi,

I have a nightly backup script that does this:

#!/usr/bin/ruby
unless (FileTest.exists?('/var/backup/svn')) then
        `mkdir /var/backup/svn`
end
youngest = `svnlook youngest /var/svn`
currentBackup = "svn-#{youngest}".chomp
currentBackupDir = "/var/backup/svn/#{currentBackup}";
# Do this test here to ensure you don't have superfluous backups
if (FileTest.exists?(currentBackupDir)) then
        exit;
end
`hot-backup.py /var/svn /var/backup/svn`
# End Script

This runs as root using crond, so after running it
all of the __db.00[0-9] files are owned by root.

I didn't do anything with permissions in this script before, but now
with the latest version of subversion 1.1.0, my mod_svn gives me
permissions errors.  I have to manually do chown apache:apache
/var/svn to make it work properly.  I could do this in the script, but
it might cause an issue where the repo is not working while
hot-backup.py is being run.  That just seems hacky.  Is there a nice
way to either run this backup nightly as apache using su, or is there
something I am missing about hot-backup.

Thanks,
Curtis

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org