From 90cd8e3c4f966dcf705f24cbb16e85a7a4d6d090 Mon Sep 17 00:00:00 2001 From: bescoto Date: Thu, 18 Aug 2005 04:40:29 +0000 Subject: Write PID to current mirror marker git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@622 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/TODO | 22 +--------------------- rdiff-backup/rdiff_backup/Main.py | 6 ++++-- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index ef47ca5..ab7ba40 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -9,6 +9,9 @@ gets deleted.) Librsync signature blocksize now based on square root of file length. +rdiff-backup now writes its PID to current_mirror marker (suggested by +Kevin Spicer). + New in v1.0.0 (2005/08/14) -------------------------- diff --git a/rdiff-backup/TODO b/rdiff-backup/TODO index 1c03df5..142bcdc 100644 --- a/rdiff-backup/TODO +++ b/rdiff-backup/TODO @@ -1,24 +1,4 @@ -Test change to see if CVS notification is working! - -Change --exclude options with restore so excluded directories aren't -deleted. (Oliver Kaltenecker) - -Check support/bug reports on Savannah occasionally. - -Consider adding --datadir option (Jean-Sébastien GOETSCHY) - -write test case for --calculate-statistics - -Use ctime to check whether files have been changed. See message: -http://mail.gnu.org/archive/html/rdiff-backup-users/2003-06/msg00050.html -by Andrew Bressen. - -Profile 0.13.x - -Examine regress handling of acls/eas/resource forks. - -Look into that strange regress error July 22nd on -prog/old/rdiff-backup/testing/testfiles/long... +Write PID of process to current_mirror file. ---------[ Medium term ]--------------------------------------- diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 37309d9..9f507c7 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -453,8 +453,10 @@ def backup_touch_curmirror_local(rpin, rpout): """ mirrorrp = Globals.rbdir.append("current_mirror.%s.%s" % (Time.curtimestr, "data")) - Log("Touching mirror marker %s" % mirrorrp.path, 6) - mirrorrp.touch() + Log("Writing mirror marker %s" % mirrorrp.path, 6) + try: pid = os.getpid() + except: pid = "NA" + mirrorrp.write_string("PID %s\n" % (pid,)) mirrorrp.fsync_with_dir() def backup_remove_curmirror_local(): -- cgit v1.2.1