On Wed, Jan 13, 2021 at 6:16 AM Bo Berglund <bo.berglund_at_gmail.com> wrote:
> I would like to set up a cron job to backup the repositories on an svn
> server to
> a Synology NAS.
> The repositories reside in /var/lib/svn and comprise about 6 Gb worth of
> in 12 different directories.
> These are svnsync:ed nightly from our main SVN server in the main office
> the world as a backup of the development activities there.
> The main svn server is VisualSvn on Windows Server 16 if that matters. The
> svnsync has worked fine for 2+ years since I set it up.
> The backup SVN server runs on an Ubuntu 18.4 LTS server in my home network
> on that network I also have a Synology NAS, which I want to use as a 3rd
> backup for the SVN repositories in case the Ubuntu server here crashes.
> I got a problem with it a few days ago when we had a power outage and the
> box did not boot properly when power returned. Now fixed but it raised the
> concern over backup security.
> I have now set up an NFS connection between the Ubuntu server and the
> NAS so I have a target dir in Ubuntu in /nfs/backup where I can write the
> So what I had in mind is to somehow keep a copy of the repository files on
> nfs share but I am not sure what command would be suitable to perform this
> I could use tar but that would be complex since there are certainly not
> files that change from one day to the other. Only changed files should be
> to reduce the time of backup.
> Or else perhaps rsync, provided it knows which files have changed and
> which have
> not etc.
> I am a user of Ubuntu Linux for some of my work and have had to learn the
> of managing Linux, but I am not versed in these actions. Daily I am a
> I don't know if some actions should be done towards svn on the ubuntu
> server in
> order to safely copy the files either...
I would use rsync. Especially since this sounds like it is mainly a last
resort backup. There are some relatively minor problems that can happen if
rsync happens to run in the middle of a transaction. The rsync still works
but it could make a backup of the repository in an incomplete state. Those
problems are fixable and the next rsync would still work and would fix the
The safer way is to use svnadmin hotcopy but you would have to script it
since you need to run it for each repository. The advantage of rsync is
that you can just process the entire root folder where your repositories
Received on 2021-01-13 12:54:43 CET