[rdiff-backup-users] Re: How to back up SELinux contexts?

2006-01-26 Thread Troels Arvin
On Thu, 26 Jan 2006 16:48:42 -0800, dean gaudet wrote:

> you probably need to install pyxattr package... i don't know the redhat
> package name.  install pylibacl while you're at it...

I already have the "python-xattr" and "python-libacl" packages installed
on both the production and backup servers.

-- 
Greetings from Troels Arvin




___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


Re: [rdiff-backup-users] How to back up SELinux contexts?

2006-01-26 Thread dean gaudet
On Wed, 25 Jan 2006, Troels Arvin wrote:

> I'm backing up a Red Hat Enterprise Linux 4 with enabled SELinux support.
> It seems that SELinux "security contexts" for files aren't backed up by
> rdiff-backup.
> 
> I tought that SELinux's security contexts were implemented by extended
> attributes (and that rdiff-backup would therefore be able to record them),
> but - well, rdiff-backup doesn't seem to store them, even when doing
> filesystem-to-filesystem backups on the same file system (no network
> in-between).

you probably need to install pyxattr package... i don't know the redhat 
package name.  install pylibacl while you're at it...

-dean



___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


[rdiff-backup-users] Re: BUG: restore.MirrorStruct.get_increment_times not in 1.0.4's Security.set_allowed_requests()

2006-01-26 Thread Charles Duffy
Eww -- sorry 'bout that formatting, all; didn't realize it would do 
that. As an attachment, this time.


(Lacking this patch, btw, I was receiving security violations on the 
specified method doing a simple restore of a backup specified with 
"--restore-as-of 0B").
--- rdiff-backup-1.0.4/rdiff_backup/Security.py.orig2006-01-26 
12:21:30.980533559 -0600
+++ rdiff-backup-1.0.4/rdiff_backup/Security.py 2006-01-26 12:21:57.997097214 
-0600
@@ -140,6 +140,7 @@
if sec_level == "read-only" or sec_level == "all":
l.extend(["fs_abilities.get_fsabilities_readonly",
  "fs_abilities.get_fsabilities_restoresource",
+ "restore.MirrorStruct.get_increment_times",
  
"restore.MirrorStruct.set_mirror_and_rest_times",
  "restore.MirrorStruct.set_mirror_select",
  "restore.MirrorStruct.initialize_rf_cache",
___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

[rdiff-backup-users] Re: --check-destination-dir failage w/ 1.0.4: Not running destination ability test?

2006-01-26 Thread Charles Duffy
I've validated (via running pdb and looking at the actual file handle
the call is being made on) that it's a directory being fsync'd. However,
this still happens even if I munge Globals.py and force
Globals.fsync_directories to 0.


___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


[rdiff-backup-users] BUG: restore.MirrorStruct.get_increment_times not in 1.0.4's Security.set_allowed_requests()

2006-01-26 Thread Charles Duffy
--- rdiff-backup-1.0.4/rdiff_backup/Security.py.orig2006-01-26
12:21:30.980533559 -0600
+++ rdiff-backup-1.0.4/rdiff_backup/Security.py 2006-01-26
12:21:57.997097214 -0600
@@ -140,6 +140,7 @@
if sec_level == "read-only" or sec_level == "all":
l.extend(["fs_abilities.get_fsabilities_readonly",
 
"fs_abilities.get_fsabilities_restoresource",
+
"restore.MirrorStruct.get_increment_times",
 
"restore.MirrorStruct.set_mirror_and_rest_times",
  "restore.MirrorStruct.set_mirror_select",
 
"restore.MirrorStruct.initialize_rf_cache",



___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


[rdiff-backup-users] --check-destination-dir failage w/ 1.0.4: Not running destination ability test?

2006-01-26 Thread Charles Duffy
This is happening on a separate pair of systems from those mentioned in
my last email. The more interesting bits are near the bottom; feel free
to skip down.

On the client:

# rdiff-backup --check-destination-dir --remote-schema 'netcat %s
10873' 10.1.128.1::/backup
Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 286, in Main
take_action(rps)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 258, in take_action
elif action == "check-destination-dir": CheckDest(rps[0])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 862, in CheckDest
dest_rp.conn.regress.Regress(dest_rp)
  File
"/usr/lib64/python2.3/site-packages/rdiff_backup/connection.py",
line 445, in __call__
return apply(self.connection.reval, (self.name,) + args)
  File
"/usr/lib64/python2.3/site-packages/rdiff_backup/connection.py",
line 367, in reval
if isinstance(result, Exception): raise result
OSError: [Errno 22] Invalid argument

On the server, session spawned by the above client:

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 286, in Main
take_action(rps)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 254, in take_action
connection.PipeConnection(sys.stdin, sys.stdout).Server()
  File
"/usr/lib64/python2.3/site-packages/rdiff_backup/connection.py",
line 352, in Server
self.get_response(-1)
  File
"/usr/lib64/python2.3/site-packages/rdiff_backup/connection.py",
line 314, in get_response
try: req_num, object = self._get()
  File
"/usr/lib64/python2.3/site-packages/rdiff_backup/connection.py",
line 230, in _get
raise ConnectionReadError("Truncated header string (problem "
rdiff_backup.connection.ConnectionReadError: Truncated header string
(problem probably originated remotely)

On the server, running locally:

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 286, in Main
take_action(rps)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 258, in take_action
elif action == "check-destination-dir": CheckDest(rps[0])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py",
line 862, in CheckDest
dest_rp.conn.regress.Regress(dest_rp)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/regress.py",
line 70, in Regress
for rf in iterate_meta_rfs(mirror_rp, inc_rpath): ITR(rf.index, rf)
  File
"/usr/lib64/python2.3/site-packages/rdiff_backup/rorpiter.py", line
285, in __call__
last_branch.fast_process(*args)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/regress.py",
line 232, in fast_process
if rf.metadata_rorp.isreg(): self.restore_orig_regfile(rf)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/regress.py",
line 262, in restore_orig_regfile
rf.mirror_rp.get_parent_rp().fsync() # require move before inc
delete
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py",
line 1068, in fsync
if not fp: self.conn.rpath.RPath.fsync_local(self)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/rpath.py",
line 1075, in fsync_local
os.fsync(fd)
OSError: [Errno 22] Invalid argument

While running with a high verbosity level, I typically see the results
of the filesystem tests -- but running locally with
--check-destination-dir, I don't see these tests being done. When they
*are* done, however, the results are as follows:

Detected abilities for destination (read/write) file system:
  Characters needing quoting   ''
  Ownership changing   On
  Hard linking On
  fsync() directories  Off
  Directory inc permissionsOn
  High-bit permissions On
  Access control lists Off
  Extended attributes  Off
  Mac OS X style resource forksOff
  Mac OS X Finder information  Off

I'm guessing, then, that check-destination-dirs is trying to call fsync
on a directory despite lack of support for such on the filesystem in
question, because (for some reason) it isn't doing the tests. (At least,
I'm *presuming* it isn't doing the tests, because even with
terminal-verbosity >= 5 they aren't printed during a local
--check-destin

[rdiff-backup-users] lock file for backup directory

2006-01-26 Thread Sebastien Maret
Listing the increments in a backup directory while an other backup is in
progress give the following error:

rdiff-backup -l host::/path/to/backup
Fatal Error: Previous backup to /path/to/backup seems to have failed.
Rerun rdiff-backup with --check-destination-dir option to revert directory to 
state before unsuccessful session.

The message is confusing, since the previous backup hasn't failed,
but it just hasn't finished yet.

Beside, I am not sure if doing other operation (like delete old
increments) while a backup is in progress is safe. If not, it might be
useful to implement a lock system, to prevent two different
rdiff-backup processes to modify a backup directory simultaneously.

Sébastien




___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


[rdiff-backup-users] rdiff-backup 1.0.4 has trouble rolling back sessions from rdiff-backup 1.0.0 without use of --check-destination-dir

2006-01-26 Thread Charles Duffy
I just upgraded one of my test systems (client and server) from
rdiff-backup 1.0.0 to 1.0.4 (both with my --force-path-prefix patch
applied; perhaps at some point I'll try to reopen the discussion on
merging it upstream). While I can run new backups and increment them,
rollbacks are failing on an archive which was last used with
rdiff-backup 1.0.0, while they succeed otherwise.

The error which occurs is as follows:

Thu Jan 26 08:22:08 2006  Previous backup seems to have failed,
regressing destination now.
Thu Jan 26 08:22:08 2006  Client sending (0): ConnectionRequest:
regress.Regress with 1 arguments
Thu Jan 26 08:22:08 2006  Client sending (0): Path: /backup
Index: ()
Data: {'size': 4096L, 'uid': 104, 'perms': 493, 'inode': 3440942L,
'devloc': 2304L, 'nlink': 6, 'mtime': 1127988993, 'gid': 100, 'atime':
1138285316, 'type': 'dir', 'ctime': 1129615237}
Thu Jan 26 08:22:09 2006  Client received (0): 'ea'
Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line
286, in Main
take_action(rps)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line
256, in take_action
elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line
300, in Backup
backup_final_init(rpout)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line
397, in backup_final_init
checkdest_if_necessary(rpout)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line
904, in checkdest_if_necessary
dest_rp.conn.regress.Regress(dest_rp)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/connection.py",
line 445, in __call__
return apply(self.connection.reval, (self.name,) + args)
  File "/usr/lib64/python2.3/site-packages/rdiff_backup/connection.py",
line 367, in reval
if isinstance(result, Exception): raise result
KeyError: 'ea'

Using --check-destination-dir to perform a rollback, as opposed to
relying on the one automatically done during a backup, results in an
uneventful regression, and later backups work successfully. If
--check-destination-dir emitted an error code for "checking unneeded"
*distinct* from other failure codes, I would probably just run it
locally to the server every time the rdiff-backup --server process is
started up and leave it at that; however, since the generic return
status 1 is used in this case (and since that same error code is used
for other failure cases as well), that's unworkable. (Personally, I
don't see why "checking unneeded" doesn't return success -- it seems
more useful that way than returning the same error code that's used for
serious issues which indicate unusability of the provided path).


___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki