Discussion:
[rsnapshot-discuss] paramenter exclude files don't work
Franco Cazzaro
2016-11-16 07:53:31 UTC
Permalink
Hi,

first, sorry for my elementary English.

I'm triing to use rsnapshot to backup a folder on my server containing
some websites, for obvious motives I'd like to exclude some files like
access and error logs, so, this is my .conf extract:

rsync_short_args -aAXvrsync_long_args --delete --numeric-ids
--delete-excluded# The include and exclude parameters, if enabled,
simply get passed directly# to rsync. If you have multiple
include/exclude patterns, put each one on a# separate line. Please look
up the --include and --exclude options in the# rsync man page for more
details on how to specify file name patterns. # exclude
'.*/log/access.log'exclude '.*/log/20*-access.log.gz'exclude
'.*/log/error.log'exclude 'tmp/PHPSESSID*'


the rsync command explode is:

/usr/bin/rsync -aAXv --delete --numeric-ids --delete-excluded \
--exclude='.*/log/access.log' --exclude='.*/log/20*-access.log.gz' \
--exclude='.*/log/error.log' --exclude='tmp/PHPSESSID*' \
--link-dest=/raid/HTTP_snapshot/hourly.1/HTTP_hourly/ /HTTP/ \
/raid/HTTP_snapshot/hourly.0/HTTP_hourly/

that works good but, the excluded files was not excluded!

so, I've copied and pasted directly in bash the command and it works perfectly!!

Is there any suggestion?

Thanks to all.
Ciao
Franco
Patrick O'Callaghan
2016-11-16 12:22:43 UTC
Permalink
exclude '.*/log/access.log'exclude '.*/log/20*-access.log.gz'exclude '.*/log/error.log'exclude 'tmp/PHPSESSID*'
Don't use quoting in these lines. They should be:

exclude .*/log/access.log
exclude .*/log/20*-access.log.gz
exclude .*/log/error.log
exclude tmp/PHPSESSID*

poc
Scott Hess
2016-11-16 15:48:13 UTC
Permalink
Post by Patrick O'Callaghan
exclude '.*/log/access.log'exclude '.*/log/20*-access.log.gz'exclude '.*/log/error.log'exclude 'tmp/PHPSESSID*'
exclude .*/log/access.log
exclude .*/log/20*-access.log.gz
exclude .*/log/error.log
exclude tmp/PHPSESSID*
Why do these have .*, here? My exclude lines are all plain glob-style
(just *). I think .*/log/... is excluding things like
".subdir/log/access.log". Perhaps it's intentional, I bring it up because
it seems odd.

-scott
John Covici
2016-11-16 16:00:08 UTC
Permalink
I think the op has the bad version of rsnapshot, I ran into this exact
problem when I built a Debian system with the default snapshot, and
mine has the same version number, but looks like some changes were
made in the way the rsync command line was processed.

On Wed, 16 Nov 2016 10:48:13 -0500,
[1 <multipart/alternative (7bit)>]
[1.1 <text/plain; UTF-8 (7bit)>]
[1.2 <text/html; UTF-8 (quoted-printable)>]
exclude '.*/log/access.log'
exclude '.*/log/20*-access.log.gz'
exclude '.*/log/error.log'
exclude 'tmp/PHPSESSID*'
exclude .*/log/access.log
exclude .*/log/20*-access.log.gz
exclude .*/log/error.log
exclude tmp/PHPSESSID*
Why do these have .*, here? My exclude lines are all plain glob-style (just *). I think .*/log/... is excluding things like ".subdir/log/access.log". Perhaps it's intentional, I bring it up because it seems odd.
-scott
[2 <text/plain; us-ascii (7bit)>]
------------------------------------------------------------------------------
[3 <text/plain; us-ascii (7bit)>]
_______________________________________________
rsnapshot-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
***@ccs.covici.com

------------------------------------------------------------------------------
Franco Cazzaro
2016-11-16 16:45:12 UTC
Permalink
Hi to all, first, sorrty for my elementary English and, thanks a lot for
Your courtesy


the directory to backupo contains many websites, in every there is a
folder like customerXYZ/log/...

also, its not possible to exclude that in website's folder ther isn't a
folder named 'log', so,
to reduce the possibility to take out of sync wrong files I defined only
some sure targets ( */log/access.log, */log/error.log etc)

the dot of ".*/" is only for try, effectively rsync launched manually
without the dot works perfectly:

/usr/bin/rsync -aAXv --delete --numeric-ids --delete-excluded \
--exclude='*/log/access.log' --exclude='*/log/20*-access.log.gz' \
--exclude='*/log/error.log' --exclude='*/tmp/PHPSESSID*' \
--link-dest=/raid/HTTP_snapshot/hourly.1/HTTP_hourly/ /HTTP/ \
/raid/HTTP_snapshot/hourly.0/HTTP_hourly/


My system is Debian 8.6, rsync 3.1.1 and rsnapshot is 1.3.1

at this point maybe the problem could be resolved in newest bersion?


Ciao a tutti

Franco
Post by John Covici
I think the op has the bad version of rsnapshot, I ran into this exact
problem when I built a Debian system with the default snapshot, and
mine has the same version number, but looks like some changes were
made in the way the rsync command line was processed.
On Wed, 16 Nov 2016 10:48:13 -0500,
[1 <multipart/alternative (7bit)>]
[1.1 <text/plain; UTF-8 (7bit)>]
[1.2 <text/html; UTF-8 (quoted-printable)>]
exclude '.*/log/access.log'
exclude '.*/log/20*-access.log.gz'
exclude '.*/log/error.log'
exclude 'tmp/PHPSESSID*'
exclude .*/log/access.log
exclude .*/log/20*-access.log.gz
exclude .*/log/error.log
exclude tmp/PHPSESSID*
Why do these have .*, here? My exclude lines are all plain glob-style (just *). I think .*/log/... is excluding things like ".subdir/log/access.log". Perhaps it's intentional, I bring it up because it seems odd.
-scott
[2 <text/plain; us-ascii (7bit)>]
------------------------------------------------------------------------------
[3 <text/plain; us-ascii (7bit)>]
_______________________________________________
rsnapshot-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
------------------------------------------------------------------------------
Franco Cazzaro
2016-11-17 07:12:07 UTC
Permalink
Hi, just one update,


Switching to 1.4.2 from github does not the difference, shure his
something regarding the way of rsync is called

Ciao a tutti

Franco
Post by Franco Cazzaro
Hi to all, first, sorrty for my elementary English and, thanks a lot
for Your courtesy
the directory to backupo contains many websites, in every there is a
folder like customerXYZ/log/...
also, its not possible to exclude that in website's folder ther isn't
a folder named 'log', so,
to reduce the possibility to take out of sync wrong files I defined
only some sure targets ( */log/access.log, */log/error.log etc)
the dot of ".*/" is only for try, effectively rsync launched manually
/usr/bin/rsync -aAXv --delete --numeric-ids --delete-excluded \
--exclude='*/log/access.log' --exclude='*/log/20*-access.log.gz' \
--exclude='*/log/error.log' --exclude='*/tmp/PHPSESSID*' \
--link-dest=/raid/HTTP_snapshot/hourly.1/HTTP_hourly/ /HTTP/ \
/raid/HTTP_snapshot/hourly.0/HTTP_hourly/
My system is Debian 8.6, rsync 3.1.1 and rsnapshot is 1.3.1
at this point maybe the problem could be resolved in newest bersion?
Ciao a tutti
Franco
Post by John Covici
I think the op has the bad version of rsnapshot, I ran into this exact
problem when I built a Debian system with the default snapshot, and
mine has the same version number, but looks like some changes were
made in the way the rsync command line was processed.
On Wed, 16 Nov 2016 10:48:13 -0500,
[1 <multipart/alternative (7bit)>]
[1.1 <text/plain; UTF-8 (7bit)>]
[1.2 <text/html; UTF-8 (quoted-printable)>]
On Wed, Nov 16, 2016 at 4:22 AM, Patrick O'Callaghan
On 16 November 2016 at 07:53, Franco Cazzaro
exclude '.*/log/access.log'
exclude '.*/log/20*-access.log.gz'
exclude '.*/log/error.log'
exclude 'tmp/PHPSESSID*'
exclude .*/log/access.log
exclude .*/log/20*-access.log.gz
exclude .*/log/error.log
exclude tmp/PHPSESSID*
Why do these have .*, here? My exclude lines are all plain
glob-style (just *). I think .*/log/... is excluding things like
".subdir/log/access.log". Perhaps it's intentional, I bring it up
because it seems odd.
-scott
[2 <text/plain; us-ascii (7bit)>]
------------------------------------------------------------------------------
[3 <text/plain; us-ascii (7bit)>]
_______________________________________________
rsnapshot-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Franco Cazzaro
2016-11-17 11:05:54 UTC
Permalink
Hi to all,

first, sorry for my elementary English and, thanks a lot for Your courtesy


the directory to backupo contains many websites, in every there is a
folder like customerXYZ/log/...

also, its not possible to exclude that in website's folder ther isn't a
folder named 'log', so,
to reduce the possibility to take out of sync wrong files I defined only
some sure targets ( */log/access.log, */log/error.log etc)

the dot of ".*/" is only for try, effectively rsync launched manually
without the dot works perfectly:

/usr/bin/rsync -aAXv --delete --numeric-ids --delete-excluded \
--exclude='*/log/access.log' --exclude='*/log/20*-access.log.gz' \
--exclude='*/log/error.log' --exclude='*/tmp/PHPSESSID*' \
--link-dest=/raid/HTTP_snapshot/hourly.1/HTTP_hourly/ /HTTP/ \
/raid/HTTP_snapshot/hourly.0/HTTP_hourly/


My system is Debian 8.6, rsync 3.1.1 and rsnapshot is 1.3.1


Switching to 1.4.2 from github does not the difference, shure is
something regarding the way of rsync is called.



Ciao a tutti

Franco
Post by Franco Cazzaro
Hi,
first, sorry for my elementary English.
I'm triing to use rsnapshot to backup a folder on my server containing
some websites, for obvious motives I'd like to exclude some files like
rsync_short_args -aAXvrsync_long_args --delete --numeric-ids
--delete-excluded# The include and exclude parameters, if enabled,
simply get passed directly# to rsync. If you have multiple
include/exclude patterns, put each one on a# separate line. Please
look up the --include and --exclude options in the# rsync man page for
more details on how to specify file name patterns. # exclude
'.*/log/access.log'exclude '.*/log/20*-access.log.gz'exclude
'.*/log/error.log'exclude 'tmp/PHPSESSID*'
/usr/bin/rsync -aAXv --delete --numeric-ids --delete-excluded \
--exclude='.*/log/access.log' --exclude='.*/log/20*-access.log.gz' \
--exclude='.*/log/error.log' --exclude='tmp/PHPSESSID*' \
--link-dest=/raid/HTTP_snapshot/hourly.1/HTTP_hourly/ /HTTP/ \
/raid/HTTP_snapshot/hourly.0/HTTP_hourly/
that works good but, the excluded files was not excluded!
so, I've copied and pasted directly in bash the command and it works perfectly!!
Is there any suggestion?
Thanks to all.
Ciao
Franco
David Keegel
2016-11-17 11:54:56 UTC
Permalink
Post by Franco Cazzaro
Hi,
first, sorry for my elementary English.
I'm triing to use rsnapshot to backup a folder on my server containing
some websites, for obvious motives I'd like to exclude some files like
rsync_short_args -aAXv
rsync_long_args --delete --numeric-ids --delete-excluded
# The include and exclude parameters, if enabled, simply get passed directly
# to rsync. If you have multiple include/exclude patterns, put each one on a
# separate line. Please look up the --include and --exclude options in the
# rsync man page for more details on how to specify file name patterns.
#
exclude '.*/log/access.log'
exclude '.*/log/20*-access.log.gz'
exclude '.*/log/error.log'
exclude 'tmp/PHPSESSID*'
Please try changing these lines to:
exclude log/access.log
exclude log/20*-access.log.gz
exclude log/error.log
exclude tmp/PHPSESSID*

I removed the ' and .*/
--
___________________________________________________________________________
David Keegel <***@cyber.com.au> Cyber IT Solutions Pty. Ltd.
http://www.cyber.com.au/~djk/ Linux & Unix Systems Administration


------------------------------------------------------------------------------
Franco Cazzaro
2016-11-17 16:14:15 UTC
Permalink
Hi,

Thanks to David finally works, the solution was so simple to make me
feel stupid ...

After the first tests were still confirm that the quotation marks, the
following syntax works correctly:

exclude */log/access.log exclude */log/20*-access.log exclude
*/log/20*-access.log.gz
Thanks a lot


Grazie e ciao a tutti
Franco
Post by David Keegel
Post by Franco Cazzaro
Hi,
first, sorry for my elementary English.
I'm triing to use rsnapshot to backup a folder on my server containing
some websites, for obvious motives I'd like to exclude some files like
rsync_short_args -aAXv
rsync_long_args --delete --numeric-ids --delete-excluded
# The include and exclude parameters, if enabled, simply get passed directly
# to rsync. If you have multiple include/exclude patterns, put each one on a
# separate line. Please look up the --include and --exclude options in the
# rsync man page for more details on how to specify file name patterns.
#
exclude '.*/log/access.log'
exclude '.*/log/20*-access.log.gz'
exclude '.*/log/error.log'
exclude 'tmp/PHPSESSID*'
exclude log/access.log
exclude log/20*-access.log.gz
exclude log/error.log
exclude tmp/PHPSESSID*
I removed the ' and .*/
Loading...