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

Re: How to safely back up an svn repository on ubuntu?

From: Bo Berglund <bo.berglund_at_gmail.com>
Date: Wed, 13 Jan 2021 23:25:20 +0100

On Wed, 13 Jan 2021 12:58:59 +0100, Pierre Fourès <pierre.foures_at_gmail.com>
wrote:

Thanks for your comments Pierre! :)

>I understand your point and have done similar setup. I've first started
>using a local svnadmin hotcopy to create a clean and safe copy of my
>repository, and then, rsynced this folder to my remote server. As I can
>handle a downtime on my svn server (in the middle of the night), I've
>switched to shutting down the server, and just rsyncing the /var/lib/svn
>sub-folders. This saved a step, a loop, and some disk usage on my local
>server.

So you mean I need to shut down the svn server first?
I don't know how to do that since svn is kind of integrated with apache on my
server...
OTOH I know exactly when the nightly svnsync is started on the source system to
copy over the day's changes to the backup server, so I could choose another time
to run my cron job.
And this backup svn server on Ubuntu is not used for anything on the synced
repositories except receiving the backup data.

Concerning rsync, I have first tested what is happening when I use ordinary file
system commands towards the nfs share on Synology...

What I found was that the owner/group fields look strange to me.
Here an example:

$ ls -l ~/www/index.php
-rw-rw-r-- 1 bosse bosse 177 Jan 13 21:32 index.php

$ cp ~/www/index.php /nfs/backup/

Then:
$ ls -l /nfs/backup/
-rw-rw-r-- 1 nobody 4294967294 177 Jan 13 23:04 index.php

Notice how the file ownership has changed in this operation.
Is rsync doing something else that keeps the ownership the same as on the
source?
Or have I set up the wrong kind of options on the mount command for the nfs
share?

>As an extra-layer of security, what you might consider too, on your
>cold-backup NAS system, is to set up a rolling backup strategy scheme. I
>was afraid of a corruption of my repositories, for which ever reason, but
>mostly from a mistake from my own self. Having multiple copies on my cold
>storage helps preventing it. Just using the day of the week while selecting
>which folder you want to rsync your files too makes you a 7 days rolling
>scheme.
>

I don't think I will need a rolling scheme here...

-- 
Bo Berglund
Developer in Sweden
Received on 2021-01-13 23:25:39 CET

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.