s3cmd throws an error with invalid regular expressions which ought to give
rise to a user error message rather than program abort. Maybe this isn't
much of an issue if all valid regular expressions work ok, but I have one
which I think is valid and ought to work differently than it does (see
third paragraph below).

Re the program abort, I have attached 2 files of error messages, one using
the installed s3cmd and also s3cmd downloaded today from github. The
command line uses a file BackupExcludesRequired.txt. This has just one line
which contains the invalid string "*~" (without the quotes). If I use the
expression ".*~" instead, there is no problem.

Re the particular regex problem, I am trying to exclude dot files with the
regular expression "\..*" (without the quotes). s3cmd sync excludes all
files with a dot anywhere in the name instead of just ones with a leading
dot. I'm wondering if regular expressions are reliable. Perhaps I'm using
the wrong definition of regular expressions? Could you please state the
regular expression model used e.g. grep or egrep.

Unfortunately neither can I exclude dot files with globbing (i.e. using
--exclude-from rather than --rexclude-from)  when I tried the expression
".*" (without the quotes) which behaves in the same way as the regex
"\..*" above, i.e. it excludes all files with a dot anywhere in the name.

Russell
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    
https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  following lines (removing any private
  info as necessary) to:
   s3tools-b...@lists.sourceforge.net


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Invoked as: /usr/local/bin/s3cmd 
--rexclude-from=/data/s3Backup/test/BackupExcludesRequired.txt sync s3test/ 
s3://mybucket-test/s3test/
Problem: error: nothing to repeat
S3cmd:   1.6.1
python:   2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2]
environment LANG=en_GB.UTF-8

Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/dist-packages/s3cmd-1.6.1-py2.7.egg/EGG-INFO/scripts/s3cmd",
 line 2919, in <module>
  File 
"/usr/local/lib/python2.7/dist-packages/s3cmd-1.6.1-py2.7.egg/EGG-INFO/scripts/s3cmd",
 line 2778, in main
  File 
"/usr/local/lib/python2.7/dist-packages/s3cmd-1.6.1-py2.7.egg/EGG-INFO/scripts/s3cmd",
 line 2331, in process_patterns
  File "/usr/lib/python2.7/re.py", line 194, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.7/re.py", line 251, in _compile
    raise error, v # invalid expression
error: nothing to repeat

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    
https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  above lines (removing any private
  info as necessary) to:
   s3tools-b...@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    
https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  following lines (removing any private
  info as necessary) to:
   s3tools-b...@lists.sourceforge.net


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Invoked as: /data/DeleteLater/After1month/S3git/s3cmd-master/s3cmd 
--rexclude-from=/data/s3Backup/test/BackupExcludesRequired.txt sync s3test/ 
s3://mybucket-test/s3test/
Problem: error: nothing to repeat
S3cmd:   1.6.1
python:   2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2]
environment LANG=en_GB.UTF-8

Traceback (most recent call last):
  File "/data/DeleteLater/After1month/S3git/s3cmd-master/s3cmd", line 2919, in 
<module>
    rc = main()
  File "/data/DeleteLater/After1month/S3git/s3cmd-master/s3cmd", line 2778, in 
main
    patterns_list, patterns_textual = process_patterns(options.rexclude, 
options.rexclude_from, is_glob = False, option_txt = "rexclude")
  File "/data/DeleteLater/After1month/S3git/s3cmd-master/s3cmd", line 2331, in 
process_patterns
    r = re.compile(pattern)
  File "/usr/lib/python2.7/re.py", line 194, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.7/re.py", line 251, in _compile
    raise error, v # invalid expression
error: nothing to repeat

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    
https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  above lines (removing any private
  info as necessary) to:
   s3tools-b...@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
S3tools-general mailing list
S3tools-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s3tools-general

Reply via email to