SCM Syncer: SVN and Git #276

Closed
wants to merge 2 commits into
from

Projects

None yet

9 participants

@kikito
kikito commented Feb 16, 2012

Hi there!

Please find attached a pull request that adds support for backing up SCMs (both with Git and SVN) into Backup.

I have tried to mimic the changes you made to my previous pull request (RSync::Push-Pull-etc). For example, this version uses a "repositories" property (alias for "directories") like so:

Backup::Model.new(:hdl_make, 'Description for hdl_make') do
  sync_with SCM::Git do |git|
    git.ip           = "example.com"
    git.path         = "backups/git"
    git.repositories do
      add "/misc/repo-1.git"
      add "/foo/bar/repo-2.git"
    end
  end
end

This will backup the repositories git://example.com/misc/repo-1.git and git://example.com/foo/bar/repo-2.git inside the folder backups/git.

Best regards,

Enrique

@kikito
kikito commented Feb 16, 2012

Hi,

I detected a small issue in 1.8.7 - apologies! Test added and fix submitted.

@mrrooijen
Member

Looks good. What do you think @burns? Also, do you feel that any of the other pull requests should be merged in before a new gem release?

@englishm

Wondering if there are any plans to add SVN/Git support to the backup gem (like this pull req, or otherwise)...

I monkey-patched a custom provider for our internal git hosting servers to push the bare repositories to additional remotes on a backup server. Unfortunately I wrote it against 3.0.19 and it seems that 9be16f7 reorganized things substantially such that my monkey-patching no longer works with newer versions of the gem.

@petemounce

Why svnsync instead of svnadmin hotcopy? I don't know the semantics of the former, but the latter allows the repository to be active during the backup; that is, it won't lose transactions in-flight. But, it's been a long time since I looked at backing up svn repositories; I'm probably out of date.

I'm not certain why we used svnsync, but I'm sure we knew svnadmin existed and yet we used svnsync. But it has been years since I have had to use these, I'm afraid I have forgotten the details. I'd venture it has to do with the permissions required for each action. But that's a guess.

I've skimmed some docs; maybe svnsync because it can operate remotely, whereas svnadmin hotcopy needs to operate locally? Flexibility I guess...? Except there are file:// URLs there, note remote ones. Shrug.

@petemounce

I'd really like for this to get merged; I discovered backups (!) recently, and I wanted exactly this, to be able to back up svn repositories.

@jamesotron

+1

@guilhem
guilhem commented Nov 5, 2012

👍
Adding mercurial (Hg) will be perfect :)

@assimovt

Looks solid. 👍

@assimovt

What should be done to get this pull request merged?

@kuraga
kuraga commented May 1, 2014

+1

@tombruijn tombruijn added the Discuss label Jul 24, 2014
@tombruijn
Member

The problem with this PR is that is has gone untouched for too long. It's from Feb 16, 2012 and all of its changes are based on the 3.0.2x version it branched off from, the 3.0 version is now at 3.11.0. I will close this PR as it is now unmergable. If someone wants to re-add this feature (for 3.0 or 4.0) please submit a new PR and we will take a look at it sooner.

@tombruijn tombruijn closed this Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment