remotebackup 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -1,149 +1,162 @@
1
- = remote_backup
2
-
3
- * http://net-ssh.rubyforge.org/remotebackup
4
-
5
- == DESCRIPTION:
6
-
7
- remote ssh backup is backup files on remote server with ssh. It's not required any program on remote server.Only download files which changed size or mday. And you can restore not only last version but also past version.
8
-
9
- == FEATURES/PROBLEMS:
10
- * Transfer files or entire directory trees from a remote host via SCP
11
- * Configurete server,path,user,password and ignore directory or files by xml.
12
- * remote_backup makes backup file tree information by yaml named yyyymmdd.yml in repository + backup name
13
- * restore_backup read backup file tree information and reconstruct from repository to outputdir.
14
- * Make backup file tree information when more than one files are changed on remote server from last backup.
15
- * Download files changed size or mday from last backup.
16
- * backup target are file,symbolic link and directory (not device,socket,pipe)
17
- * restore whichever version by specified backup file tree information.
18
- * Only Linux or BSD (not windows)
19
-
20
-
21
- == SYNOPSIS:
22
-
23
- In a nutshell:
24
- To use remote_backup,you should prepare backup configuretion by xml such below.
25
- <backups>
26
- <backup>
27
- <name>backup name</name>
28
- <server>server name</server>
29
- <user>user name</user>
30
- <password>user name</password>
31
- <path>path for backup</path>
32
- <ignore_list>
33
- <ignore>regular expression for not backup </ignore>
34
- :
35
- </ignore_list>
36
- </backup>
37
- :
38
- </backups>
39
-
40
- /backups
41
- mandatory. root directory. It has children of backup informations
42
- /backups/backup
43
- mandatory. unit of backup information
44
- /backups/backup/name
45
- mandatory. backup information name
46
- /backups/backup/server
47
- mandatory. remote host address.
48
- /backups/backup/user
49
- mandatory. login name to remote host .
50
- /backups/backup/password
51
- mandatory. login password to remote host .
52
- /backups/backup/path
53
- mandatory. path for begin to backup on remote host.
54
- /backups/backup/ignore_list
55
- option. parent of ignore entity.
56
- /backups/backup/ignore
57
- option. don't wish file or directory name under backup path.
58
-
59
- command
60
- remote_backup [-f filename] [-o output repository directory]
61
-
62
- filename:
63
- file name written backup information. if not specified default is ./backup.xml
64
- output directory:
65
- repository directory. if not specified default is .(current directory)
66
- Backup file is stored and backup file tree information yaml is maked in repository directory
67
- + backup name.
68
-
69
- restore_backup -f filename -o output directory
70
- filename:
71
- backup file tree information yaml which locate repository directory + backup name + yyyymmdd.yaml
72
- output directory:
73
- directory you want to make backup tree.
74
-
75
- == REQUIREMENTS:
76
-
77
- * Net::SSH 2
78
- * Net::SCP
79
-
80
- == INSTALL:
81
-
82
- * gem install remote-backup (might need sudo privileges)
83
-
84
- Or, you can do it the hard way (without Rubygems):
85
-
86
- * tar xzf net-backup-*.tgz
87
- * cd remote-backup-*
88
- * ruby setup.rb config
89
- * ruby setup.rb install (might need sudo privileges)
90
-
91
- == LICENSE:
92
- Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
93
- You can redistribute it and/or modify it under either the terms of the GPL
94
- (see COPYING.txt file), or the conditions below:
95
-
96
- 1. You may make and give away verbatim copies of the source form of the
97
- software without restriction, provided that you duplicate all of the
98
- original copyright notices and associated disclaimers.
99
-
100
- 2. You may modify your copy of the software in any way, provided that
101
- you do at least ONE of the following:
102
-
103
- a) place your modifications in the Public Domain or otherwise
104
- make them Freely Available, such as by posting said
105
- modifications to Usenet or an equivalent medium, or by allowing
106
- the author to include your modifications in the software.
107
-
108
- b) use the modified software only within your corporation or
109
- organization.
110
-
111
- c) rename any non-standard executables so the names do not conflict
112
- with standard executables, which must also be provided.
113
-
114
- d) make other distribution arrangements with the author.
115
-
116
- 3. You may distribute the software in object code or executable
117
- form, provided that you do at least ONE of the following:
118
-
119
- a) distribute the executables and library files of the software,
120
- together with instructions (in the manual page or equivalent)
121
- on where to get the original distribution.
122
-
123
- b) accompany the distribution with the machine-readable source of
124
- the software.
125
-
126
- c) give non-standard executables non-standard names, with
127
- instructions on where to get the original software distribution.
128
-
129
- d) make other distribution arrangements with the author.
130
-
131
- 4. You may modify and include the part of the software into any other
132
- software (possibly commercial). But some files in the distribution
133
- are not written by the author, so that they are not under this terms.
134
-
135
- They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
136
- files under the ./missing directory. See each file for the copying
137
- condition.
138
-
139
- 5. The scripts and library files supplied as input to or produced as
140
- output from the software do not automatically fall under the
141
- copyright of the software, but belong to whomever generated them,
142
- and may be sold commercially, and may be aggregated with this
143
- software.
144
-
145
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
146
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
147
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
148
- PURPOSE.
149
-
1
+ = remote_backup
2
+
3
+ * http://net-ssh.rubyforge.org/remotebackup
4
+
5
+ == DESCRIPTION:
6
+
7
+ remote ssh backup is backup files on remote server with ssh. It's not required any program on remote server.Only download files which changed size or mday. And you can restore not only last version but also past version.
8
+
9
+ == FEATURES/PROBLEMS:
10
+ * Transfer files or entire directory trees from a remote host via SCP
11
+ * Configurete server,path,user,password and ignore directory or files by xml.
12
+ * remote_backup makes backup file tree information by yaml named yyyymmdd.yml in repository + backup name
13
+ * restore_backup read backup file tree information and reconstruct from repository to outputdir.
14
+ * Make backup file tree information when more than one files are changed on remote server from last backup.
15
+ * Download files changed size or mday from last backup.
16
+ * backup target are file,symbolic link and directory (not device,socket,pipe)
17
+ * restore whichever version by specified backup file tree information.
18
+ * Only Linux or BSD (not windows)
19
+
20
+
21
+ == SYNOPSIS:
22
+
23
+ In a nutshell:
24
+ To use remote_backup,you should prepare backup configuretion by xml such below.
25
+ <backups>
26
+ <backup>
27
+ <name>backup name</name>
28
+ <server>server name</server>
29
+ <user>login name</user>
30
+ <password>login password</password>
31
+ <path>path for backup</path>
32
+ <ignore_list>
33
+ <ignore>regular expression for not backup </ignore>
34
+ :
35
+ </ignore_list>
36
+ </backup>
37
+ :
38
+ </backups>
39
+
40
+ /backups
41
+ mandatory. root directory. It has children of backup informations
42
+ /backups/backup
43
+ mandatory. unit of backup information
44
+ /backups/backup/name
45
+ mandatory. backup information name
46
+ /backups/backup/server
47
+ mandatory. remote host address.
48
+ /backups/backup/user
49
+ mandatory. login name to remote host .
50
+ /backups/backup/password
51
+ mandatory. login password to remote host .
52
+ /backups/backup/path
53
+ mandatory. path for begin to backup on remote host.
54
+ /backups/backup/ignore_list
55
+ option. parent of ignore entity.
56
+ /backups/backup/ignore
57
+ option. don't wish file or directory name under backup path.
58
+
59
+ command:
60
+
61
+ remote_backup [-f filename] [-o output_dir] [-v verbos]
62
+
63
+
64
+ filename:
65
+ file name written backup information. if not specified default is ./backup.xml
66
+
67
+ output_dir:
68
+ repository directory. if not specified default is .(current directory)
69
+ Backup file is stored and backup file tree information yaml is maked in repository directory
70
+ + backup name.
71
+
72
+ verbos
73
+ print progress to stdout
74
+
75
+
76
+ restore_backup -f filename -o output directory [-v verbos]
77
+
78
+
79
+ filename:
80
+ backup file tree information yaml which locate repository directory + backup name + yyyy_mm_dd_hh_mm.yaml
81
+
82
+ output directory:
83
+ directory you want to make backup tree.
84
+
85
+ verbos
86
+ print progress to stdout
87
+
88
+ == REQUIREMENTS:
89
+
90
+ * Net::SSH 2
91
+ * Net::SCP
92
+
93
+ == INSTALL:
94
+
95
+ * gem install remote-backup (might need sudo privileges)
96
+
97
+ Or, you can do it the hard way (without Rubygems):
98
+
99
+ * tar xzf net-backup-*.tgz
100
+ * cd remote-backup-*
101
+ * ruby setup.rb config
102
+ * ruby setup.rb install (might need sudo privileges)
103
+
104
+ == LICENSE:
105
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
106
+ You can redistribute it and/or modify it under either the terms of the GPL
107
+ (see COPYING.txt file), or the conditions below:
108
+
109
+ 1. You may make and give away verbatim copies of the source form of the
110
+ software without restriction, provided that you duplicate all of the
111
+ original copyright notices and associated disclaimers.
112
+
113
+ 2. You may modify your copy of the software in any way, provided that
114
+ you do at least ONE of the following:
115
+
116
+ a) place your modifications in the Public Domain or otherwise
117
+ make them Freely Available, such as by posting said
118
+ modifications to Usenet or an equivalent medium, or by allowing
119
+ the author to include your modifications in the software.
120
+
121
+ b) use the modified software only within your corporation or
122
+ organization.
123
+
124
+ c) rename any non-standard executables so the names do not conflict
125
+ with standard executables, which must also be provided.
126
+
127
+ d) make other distribution arrangements with the author.
128
+
129
+ 3. You may distribute the software in object code or executable
130
+ form, provided that you do at least ONE of the following:
131
+
132
+ a) distribute the executables and library files of the software,
133
+ together with instructions (in the manual page or equivalent)
134
+ on where to get the original distribution.
135
+
136
+ b) accompany the distribution with the machine-readable source of
137
+ the software.
138
+
139
+ c) give non-standard executables non-standard names, with
140
+ instructions on where to get the original software distribution.
141
+
142
+ d) make other distribution arrangements with the author.
143
+
144
+ 4. You may modify and include the part of the software into any other
145
+ software (possibly commercial). But some files in the distribution
146
+ are not written by the author, so that they are not under this terms.
147
+
148
+ They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
149
+ files under the ./missing directory. See each file for the copying
150
+ condition.
151
+
152
+ 5. The scripts and library files supplied as input to or produced as
153
+ output from the software do not automatically fall under the
154
+ copyright of the software, but belong to whomever generated them,
155
+ and may be sold commercially, and may be aggregated with this
156
+ software.
157
+
158
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
159
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
160
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
161
+ PURPOSE.
162
+
data/bin/restore_backup CHANGED
@@ -55,5 +55,5 @@ def opt_parse()
55
55
  end
56
56
  end
57
57
  opt_parse
58
- rs=RemoteBackup::Restore.new($config_file,$config_out_dir)
58
+ rs=Remotebackup::Restore.new($config_file,$config_out_dir)
59
59
  rs.start
@@ -2,7 +2,7 @@ module Remotebackup
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/remotebackup.rb CHANGED
@@ -266,12 +266,15 @@ module Remotebackup
266
266
  msg_out "Restore start #{File.dirname(@config_file)}"
267
267
  msg_out "-------------------------------------------"
268
268
  @file_info_map["directory"].each do |dir|
269
+ msg_out "mkdir -p #{@config_out_dir}/#{dir}"
269
270
  FileUtils.mkdir_p(@config_out_dir + "/" + dir)
270
271
  end
271
272
  @file_info_map["symbolic"].each do |key,val|
273
+ msg_out "link -s #{val['source']} #{@config_out_dir}/#{key}"
272
274
  FileUtils.symlink(val["source"],@config_out_dir + "/" + key)
273
275
  end
274
276
  @file_info_map["file"].each do |key,val|
277
+ msg_out "cp #{val['file_name']} #{@config_out_dir}/#{key}"
275
278
  FileUtils.cp(val["file_name"],@config_out_dir + "/" + key)
276
279
  end
277
280
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: remotebackup
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.0
7
- date: 2008-06-23 00:00:00 +09:00
6
+ version: 0.5.1
7
+ date: 2008-06-24 00:00:00 +09:00
8
8
  summary: description of gem
9
9
  require_paths:
10
10
  - lib