svn-backup 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -7,7 +7,7 @@ many unnecessary files, or otherwise don't fit my needs.
7
7
 
8
8
  svn-backup generates portable subversion dumpfiles that can be loaded
9
9
  into nearly any repository. It relies on the little-known fact that
10
- incremental dumpfiles can simply be /appended/ to an existing dumpfile.
10
+ incremental dumpfiles can simply be *appended* to an existing dumpfile.
11
11
  svn-backup creates a full dumpfile on first run, and then continually
12
12
  appends to that dumpfile. In this way, 100 subversion repositories will only
13
13
  ever be contained within 100 dumpfiles, no matter how many times the backup
@@ -51,14 +51,17 @@ Or install it yourself as:
51
51
  svn-backup assumes that you have number of subversion repositories
52
52
  located at a common root:
53
53
 
54
+ ```
54
55
  /var/svn
55
56
  repository_1/
56
57
  repository_2/
57
58
  ...
58
59
  repository_n/
60
+ ```
59
61
 
60
62
  A sample configuration file (in YAML format) might look like this:
61
63
 
64
+ ```
62
65
  ---
63
66
  :svn_root: /var/svn
64
67
  :svnadmin: /usr/bin/svnadmin
@@ -68,6 +71,7 @@ A sample configuration file (in YAML format) might look like this:
68
71
  :gzip: true
69
72
  :gzip_path: /bin/gzip
70
73
  :quiet: false
74
+ ```
71
75
 
72
76
  In this case, subversion repositories will be inspected at /var/svn, and the
73
77
  resulting dumpfiles will be located at /var/backup/svn.
@@ -79,11 +83,13 @@ repository.
79
83
 
80
84
  ## Usage
81
85
 
86
+ ```
82
87
  Usage: svn-backup [options]
83
88
  -h, --help Usage information
84
89
  -q, --quiet Output less status information
85
90
  -c, --config FILE Config file
86
91
  -v, --version Version
92
+ ```
87
93
 
88
94
  ## Restoration
89
95
 
@@ -91,21 +97,23 @@ svn-backup generates simple subversion dumpfiles that can be loaded with
91
97
  svnadmin.
92
98
 
93
99
  Step 1: Create an empty repository
100
+ ```
94
101
  svnadmin create /var/svn/repository_1
95
-
102
+ ```
96
103
  Step 2: Load the dumpfile
104
+ ```
97
105
  svnadmin load /var/svn/repository_1 < repository_1.dumpfile
98
-
106
+ ```
99
107
  Step 3: There is no step 3!
100
108
 
101
109
  A simple bash command can load all repositories at once:
102
-
110
+ ```
103
111
  find . -type f -name "*.dumpfile" | while read i; do repository_name=`basename "$i" .dumpfile`; svnadmin create "$repository_name" && svnadmin load "$repository_name" < "$i"; done
104
-
112
+ ```
105
113
  Or, if gzipped:
106
-
114
+ ```
107
115
  find . -type f -name "*.dumpfile.gz" | while read i; do repository_name=`basename "$i" .dumpfile.gz`; svnadmin create "$repository_name" && zcat "$i" | svnadmin load "$repository_name"; done
108
-
116
+ ```
109
117
  ## Upgrade
110
118
 
111
119
  Please note that upgrading from 0.1.x to 0.2.x will cause a full backup
data/bin/svn-backup CHANGED
@@ -38,7 +38,8 @@ optparse.parse!
38
38
  config_file ||= 'svn-backup.yaml'
39
39
  FileUtils.touch config_file
40
40
  config = YAML::load(File.open(config_file))
41
- config ||= {}
41
+ abort('Could not find svn-backup.yaml config file; specify with -c') unless config
42
+
42
43
  config[:svnadmin] ||= IO.popen("which svnadmin") {}
43
44
  config[:svnlook] ||= IO.popen("which svnlook") {}
44
45
  config[:repository_state] ||= 'repositories.yaml'
@@ -1,5 +1,5 @@
1
1
  module Svn
2
2
  module Backup
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svn-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-02 00:00:00.000000000 Z
12
+ date: 2012-11-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: svn-backup utilizes the composition properties of subversion dumpfiles
15
15
  and gzip files to efficiently backup large repositories.