rdiff-backup1.0.5 通常バックアップ中に元ファイルが変更されると転送されたファイルを
削除するけど、しなくするパッチ。
--- rdiff-backup-1.0.5.org/rdiff_backup/backup.py 2006-11-12 16:32:01.000000000 +0900
+++ rdiff-backup-1.0.5/rdiff_backup/backup.py 2008-04-03 23:10:26.000000000 +0900
@@ -531,7 +531,7 @@
if cached_rorp and cached_rorp.equal_loose(new_rp): return 1
log.ErrorLog.write_if_open("UpdateError", diff_rorp, "Updated mirror "
"temp file %s does not match source" % (new_rp.path,))
- return 0
+ return 1
def write_special(self, diff_rorp, new):
"""Write diff_rorp (which holds special file) to new"""
ついでに、sshで-iオプションを無理やり使えるようにするパッチ。
diff -cr rdiff-backup-1.0.5/rdiff_backup/Main.py rdiff-backup-1.0.5-changed/rdiff_backup/Main.py
*** rdiff-backup-1.0.5/rdiff_backup/Main.py Sun Nov 12 16:32:01 2006
--- rdiff-backup-1.0.5-changed/rdiff_backup/Main.py Fri Apr 25 18:24:59 2008
***************
*** 77,83 ****
"print-statistics", "remote-cmd=", "remote-schema=",
"remove-older-than=", "restore-as-of=", "restrict=",
"restrict-read-only=", "restrict-update-only=", "server",
! "ssh-no-compression", "terminal-verbosity=", "test-server",
"user-mapping-file=", "verbosity=", "version"])
except getopt.error, e:
commandline_error("Bad commandline options: %s" % str(e))
--- 77,83 ----
"print-statistics", "remote-cmd=", "remote-schema=",
"remove-older-than=", "restore-as-of=", "restrict=",
"restrict-read-only=", "restrict-update-only=", "server",
! "ssh-no-compression", "ssh-private-key=", "terminal-verbosity=", "test-server",
"user-mapping-file=", "verbosity=", "version"])
except getopt.error, e:
commandline_error("Bad commandline options: %s" % str(e))
***************
*** 179,184 ****
--- 179,186 ----
Globals.server = 1
elif opt == "--ssh-no-compression":
Globals.set('ssh_compression', None)
+ elif opt == "--ssh-private-key":
+ Globals.set('ssh_private_key', arg)
elif opt == "--terminal-verbosity": Log.setterm_verbosity(arg)
elif opt == "--test-server": action = "test-server"
elif opt == "--user-mapping-file": user_mapping_filename = arg
Only in rdiff-backup-1.0.5-changed/rdiff_backup/: Main.py~
diff -cr rdiff-backup-1.0.5/rdiff_backup/SetConnections.py rdiff-backup-1.0.5-changed/rdiff_backup/SetConnections.py
*** rdiff-backup-1.0.5/rdiff_backup/SetConnections.py Sun Nov 12 16:32:01 2006
--- rdiff-backup-1.0.5-changed/rdiff_backup/SetConnections.py Fri Apr 25 18:02:55 2008
***************
*** 32,39 ****
# This is the schema that determines how rdiff-backup will open a
# pipe to the remote system. If the file is given as A::B, %s will
# be substituted with A in the schema.
! __cmd_schema = 'ssh -C %s rdiff-backup --server'
! __cmd_schema_no_compress = 'ssh %s rdiff-backup --server'
# This is a list of remote commands used to start the connections.
# The first is None because it is the local connection.
--- 32,39 ----
# This is the schema that determines how rdiff-backup will open a
# pipe to the remote system. If the file is given as A::B, %s will
# be substituted with A in the schema.
! __cmd_schema = 'ssh -i %s -C %s rdiff-backup --server'
! __cmd_schema_no_compress = 'ssh -i %s %s rdiff-backup --server'
# This is a list of remote commands used to start the connections.
# The first is None because it is the local connection.
***************
*** 116,122 ****
def fill_schema(host_info):
"""Fills host_info into the schema and returns remote command"""
! return __cmd_schema % host_info
def init_connection(remote_cmd):
"""Run remote_cmd, register connection, and then return it
--- 116,122 ----
def fill_schema(host_info):
"""Fills host_info into the schema and returns remote command"""
! return __cmd_schema % (Globals.get('ssh_private_key'), host_info)
def init_connection(remote_cmd):
"""Run remote_cmd, register connection, and then return it