On Mon, Mar 17, 2008 at 3:48 AM, Vivek Payala <vivek_payala_at_persistent.co.in>
wrote:
> Hello,
>
>
>
> I have scheduled my SVN repositories to be backed up using 'svnadmin
> hotcopy'. I wrote a small wrapper script which gets the list of SVN
> repositories and backs them one after the other. However I observed that
> after the hotcopy script execution is over my source repositories group
> ownership becomes read/execute, which earlier used to be 'rwx'. I thought
> hotcopy is supposed to take online backups. But if this is the case I would
> have problems taking backup using hotcopy. Could you please let me know how
> to fix this.
>
>
>
> I am pasting my script below for reference.
>
>
>
>
>
> #!/usr/bin/perl
>
>
>
> #######################################################################
>
> # Author: Vivek Payala #
>
> # Purpose: For backing up SVN repositories on Master using HotCopy #
>
> # Usage: ./hotcopy.pl #
>
> #######################################################################
>
>
>
> use strict;
>
> use warnings;
>
>
>
>
>
> my $svnreporoot = "\\/usr\\/local\\/svnroot";
>
> my $backuppath = "/home/svn/backups_svnroot";
>
> my @svn_reps = glob("$svnreporoot/*");
>
> my @mods_bkp;
>
>
>
> my $sysCmd = "rm -rf $backuppath/*";
>
> system $sysCmd and die $!;
>
>
>
> for my $svn_repo_path (@svn_reps)
>
> {
>
> my @svnModNames = reverse (split /\//, $svn_repo_path);
>
> my $modName = shift @svnModNames;
>
> push @mods_bkp, $modName;
>
> print "Backing up $modName \n";
>
> $sysCmd = "svnadmin hotcopy $svnreporoot/$modName
> $backuppath/$modName";
>
> system $sysCmd;
>
> }
>
What is the umask for the user that runs the backup script? Is it set to
0022 or something like that? The umask can affect the directories that are
created during the hotcopy.
Thanks,
-Hari
Received on 2008-03-17 21:05:20 CET