SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Automatic setting of "chars_to_quote"
Author Message
Post Automatic setting of "chars_to_quote" 
Hi All,

I'm using the latest build (from CVS) of rdiff-backup on a Mac OS X
system. It seems to be working well (handles the resource forks and the
like). However, I noticed a slightly annoying behavior that I'd like to
be able to control, or get changed.

The rdiff-backup code properly recognizes the destination backup drive
as "case-insensitive" (i.e. HFS), and the source drive as
"case-insensitive" (i.e. also HFS) and thus enables character quoting
for capitalized letters (A-Z). However, for me, this is annoying. Since
both my source and destination drives are HFS (case-insensitive)
(actually all my possible backup drives are HFS), I would prefer that
it does NOT enable the quoting since I would never have an issue with
case-sensitivity in the backups since the source data could never have
a clash in case anyway.

So, my questions are: Is there a way to disable this at runtime for my
own backups? Or better yet, can the code be changed to NOT
automatically quote characters when both the source and destination
drives are case-insensitive? Seems like a safe behavior if the source
and destinations are the same.

Excellent program BTW!!

Thanks!
-Robert

Post Automatic setting of "chars_to_quote" 
Hi again,

On Jun 8, 2004, at 2:00 PM, Robert Shaw wrote:
The rdiff-backup code properly recognizes the destination backup drive
as "case-insensitive" (i.e. HFS), and the source drive as
"case-insensitive" (i.e. also HFS) and thus enables character quoting
for capitalized letters (A-Z).

Let me clarify that it properly recognizes the destination backup drive
as "case-insensitive", but it never really checks that the source drive
is also "case-insensitive" (but it does recognize it as an HFS/Mac OS X
drive which is case-insensitive). I think that it should check both for
case-insenitivity and use that to determine if the destination backup
should have chars_to_quote enabled.

Thanks.
-Robert

Post Automatic setting of "chars_to_quote" 
Robert Shaw <rshaw < at > opendarwin.org>
wrote the following on Tue, 8 Jun 2004 14:00:55 -0700

The rdiff-backup code properly recognizes the destination backup
drive as "case-insensitive" (i.e. HFS), and the source drive as
"case-insensitive" (i.e. also HFS) and thus enables character
quoting for capitalized letters (A-Z). However, for me, this is
annoying. Since both my source and destination drives are HFS
(case-insensitive) (actually all my possible backup drives are HFS),
I would prefer that it does NOT enable the quoting since I would
never have an issue with case-sensitivity in the backups since the
source data could never have a clash in case anyway.

So, my questions are: Is there a way to disable this at runtime for
my own backups? Or better yet, can the code be changed to NOT
automatically quote characters when both the source and destination
drives are case-insensitive? Seems like a safe behavior if the
source and destinations are the same.

Try using --override-chars-to-quote '' (i.e. pass this option an empty
string). This is an undocumented option and definitely hasn't been
tested for what you want to do.

About what you suggest, I see at least two potential problems:

1) Later on, someone tries to back up a different, case-sensitive,
file system to the same repository. This is a problem because the
quoting is a property of the entire repository, not an individual
session.

2) Although the root source directory is case-insensitive, other
filesystems are mounted inside and are case-sensitive.

That being said, I can see why filename quoting would be a pain when
just doing HPS -> HPS. It would be useful to hear from various Mac
folk on what the default should be.


--
Ben Escoto

Post Automatic setting of "chars_to_quote" 
Hi Ben,

On Jun 8, 2004, at 3:49 PM, Ben Escoto wrote:
Try using --override-chars-to-quote '' (i.e. pass this option an empty
string). This is an undocumented option and definitely hasn't been
tested for what you want to do.

Ok, this works. I can deal with this for my usage for now. I was trying
to find the option that let me override it on the command line but
wasn't finding it. This appears to work. One problem (at least it looks
like a problem), is that if I forget to add the override option on
subsequent backups (after the initial one), the Python code crashes
with a traceback. Probably not a good thing. Here's part of it that I
think is the problem:

AttributeError: 'module' object has no attribute 'FatalError'
Traceback (most recent call last):
File "/opt/local/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 270, in
Main
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/l

About what you suggest, I see at least two potential problems:

1) Later on, someone tries to back up a different, case-sensitive,
file system to the same repository. This is a problem because the
quoting is a property of the entire repository, not an individual
session.


2) Although the root source directory is case-insensitive, other
filesystems are mounted inside and are case-sensitive.

That being said, I can see why filename quoting would be a pain when
just doing HPS -> HPS. It would be useful to hear from various Mac
folk on what the default should be.

I agree with your points 1 and 2. I guess I can deal with the hairy
option above, but it would be nice if there was a way to configure this
initially, and then not have to have the option on every backup. Maybe
some sort of /etc conf file it could read?

Thanks!
-Robert

Post Automatic setting of "chars_to_quote" 
Ben Escoto <ben < at > emerose.org> writes:
About what you suggest, I see at least two potential problems:

1) Later on, someone tries to back up a different, case-sensitive,
file system to the same repository. This is a problem because the
quoting is a property of the entire repository, not an individual
session.

2) Although the root source directory is case-insensitive, other
filesystems are mounted inside and are case-sensitive.

I suspect that keeping the current default behavior and writing the
docs to call attention to the fact that folks might want to flip this bit
is probably the way to go.

That way, folks who don't bother to read too carefully may think the
repository is ugly, but won't shoot themselves in the feet, while those
who do read the docs can make it work the way they want to while being
warned of possible consequences.

(Assuming, of course, that --chars-to-quote makes it to a documented state,
and gets a little more fault-tolerant).

Post Automatic setting of "chars_to_quote" 
Hi Ben,

On Jun 8, 2004, at 3:49 PM, Ben Escoto wrote:
Try using --override-chars-to-quote '' (i.e. pass this option an empty
string). This is an undocumented option and definitely hasn't been
tested for what you want to do.

I've been using this option in my backup tests and it seems to work ok
most of the time. However, if I have a backup I've done using
--override-chars-to-quote '' and I try to do the following:

rdiff-backup --remove-older-than 60D /path/to/backup

It crashes with the following stack trace:

Traceback (most recent call last):
File "/opt/local/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 270, in
Main
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 248, in
take_action
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 727, in
RemoveOlderThan
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 669, in
require_root_set
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 690, in
single_set_fs_globals
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/fs_abilities.py", line
394, in get_fsabilities_readwrite
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/fs_abilities.py", line
154, in init_readwrite
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/fs_abilities.py", line
177, in compare_chars_to_quote
AttributeError: 'module' object has no attribute 'FatalError'

I'm using the latest code from CVS (as of yesterday). If I create a
backup that did not use --override-chars-to-quote '' the above command
works just fine.

Can you look into this and fix it?

Thanks!
-Robert

Post Automatic setting of "chars_to_quote" 
Hi Ben,

I fixed this problem with the attached patches. It seems to work now.
Can you please review the changes and roll them into your code
officially?

Thanks!!!
-Robert

On Jun 16, 2004, at 8:51 PM, Robert Shaw wrote:

Hi Ben,

On Jun 8, 2004, at 3:49 PM, Ben Escoto wrote:
Try using --override-chars-to-quote '' (i.e. pass this option an empty
string). This is an undocumented option and definitely hasn't been
tested for what you want to do.

I've been using this option in my backup tests and it seems to work ok
most of the time. However, if I have a backup I've done using
--override-chars-to-quote '' and I try to do the following:

rdiff-backup --remove-older-than 60D /path/to/backup

It crashes with the following stack trace:

Traceback (most recent call last):
File "/opt/local/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 270, in
Main
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 248, in
take_action
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 727, in
RemoveOlderThan
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 669, in
require_root_set
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/Main.py", line 690, in
single_set_fs_globals
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/fs_abilities.py", line
394, in get_fsabilities_readwrite
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/fs_abilities.py", line
154, in init_readwrite
File
"/opt/darwinports/dports/python/py-rdiff-backup/work/destroot/opt/
local/lib/python2.3/site-packages/rdiff_backup/fs_abilities.py", line
177, in compare_chars_to_quote
AttributeError: 'module' object has no attribute 'FatalError'

I'm using the latest code from CVS (as of yesterday). If I create a
backup that did not use --override-chars-to-quote '' the above command
works just fine.

Can you look into this and fix it?

Thanks!
-Robert


Post Automatic setting of "chars_to_quote" 
Ben,

Here is an updated fs_attributes.py patch. It makes some additional log
message modifications to make the output more consistent (pretty). If
you could roll these changes in, I'd appreciate it!

Thanks!
-Robert

On Jun 16, 2004, at 9:03 PM, Robert Shaw wrote:

Hi Ben,

I fixed this problem with the attached patches. It seems to work now.
Can you please review the changes and roll them into your code
officially?

Thanks!!!
-Robert


Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB