Re: Syncing multiple sub-directories to one directory

2020-09-29 Thread Kevin Korb via rsync
Interesting idea.  It isn't something I have ever wanted to do.  BTW, if
your find is recent use + instead of \;.  + replaces {} with however
many entries fit in the command line length limit instead of running
individual rsync processes for each entry.

On 9/29/20 7:46 PM, Rob Campbell via rsync wrote:
> Thanks for your help.  What you provided didn't work for me because that
> still placed things in subdirectories.
> 
> I figured it out.  This puts it all in the images directory.
> 
> find /my/phone/root/dir/ \( -path '*Duo*' -o -path '*DCIM*' -o -path
> '*Pictures*' -o -path '*Camera*' -o -path "*Download*" -o -path
> "*textgram*" -o -path "*WhatsApp*" ! -path '*.textgram*' ! -path
> '*.thumbnails*' \) -type f \( -iname '*.jp*g' -o -iname '*.png' -o
> -iname '*.dng' -o -iname '*.raw' -o -iname '*.raw' \) -exec rsync -uz
> --progress "{}" /my/backup/directory/for/images/ \;
> 
> ~
> When you are principled, set standards and stick to them some people will 
> fall out of your life; let them!
> 
> 
> On Tue, Sep 29, 2020 at 1:33 PM Wayne Davison  > wrote:
> 
> On Tue, Sep 29, 2020 at 7:38 AM Rob Campbell wrote:
> 
> I would like to sync many subdirectories into one directory with
> no subdirectories. I've tried
> 
> rsync -rv --progress --include '*.jp*g' --include '*.png'
> --include '*.dng' --include '*.raw' --include '*.nef' --include
> 'Duo' --include 'DCIM' --include 'WhatsApp' --exclude '*'
> /my/phone/root/dir/ /my/backup/directory/for/images/
> 
> 
> You didn't specify what isn't working as you expect. That command
> works fine for the 3 listed dir names as long as you either don't
> have matching files inside /my/phone/root/dir (or as long as it's ok
> to also copy those files) and as long as there aren't subdirs or
> files named the same as the 3 top dirs you included. The latter can
> be fixed by anchoring your dir names and making them only match a
> dir (e.g. --include '/Duo/').  If you want to have the copy avoid
> files in the top dir you can either change all the file-based
> includes to have a "*/" prefix (such as "--include '*/*.png' ...")
> or you can change the dir includes into args and exclude '*/*'
> instead of "*".  The last option would look like this (I also tossed
> in -i):
> 
> rsync -riv --progress --include '*.jp*g' --include '*.png' --include
> '*.dng' --include '*.raw' --include '*.nef' --exclude '*/*'
> /my/phone/root/dir/{Duo,DCIM,WhatsApp} /my/backup/directory/for/images/
> 
> That assumes you've got bash to do the brace expansion, but you
> could change that into 3 arg paths if you need to. You may also want
> to add --del if you want rsync to delete inside the 3 listed dirs.
> 
> I'm not sure why you listed an extra command with "NewDir" when it's
> not mentioned in the first command.  If that is an indication that
> you really want to copy all dirs under root/dir (not just the 3
> named dirs in the first command) then you could use an include of
> "/*/" to match any dir in the root of the transfer, like this:
> 
> rsync -riv --progress --include '*.jp*g' --include '*.png' --include
> '*.dng' --include '*.raw' --include '*.nef' --include '/*/'
> --exclude '*' /my/phone/root/dir/ /my/backup/directory/for/images/
> 
> One last suggestion, I like to make the args shorter by using -f
> (filter) commands, so an include example is -f '+ *.png' and an
> exclude example is -f '- /*/' (those are identical to the equivalent
> include/exclude args, so that's just personal preference).
> 
> ..wayne..
> 
> 

-- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   https://sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,



signature.asc
Description: OpenPGP digital signature
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Syncing multiple sub-directories to one directory

2020-09-29 Thread Rob Campbell via rsync
Thanks for your help.  What you provided didn't work for me because that
still placed things in subdirectories.

I figured it out.  This puts it all in the images directory.

find /my/phone/root/dir/ \( -path '*Duo*' -o -path '*DCIM*' -o -path
'*Pictures*' -o -path '*Camera*' -o -path "*Download*" -o -path
"*textgram*" -o -path "*WhatsApp*" ! -path '*.textgram*' ! -path
'*.thumbnails*' \) -type f \( -iname '*.jp*g' -o -iname '*.png' -o -iname
'*.dng' -o -iname '*.raw' -o -iname '*.raw' \) -exec rsync -uz --progress
"{}" /my/backup/directory/for/images/ \;

~
When you are principled, set standards and stick to them some people will
fall out of your life; let them!


On Tue, Sep 29, 2020 at 1:33 PM Wayne Davison  wrote:

> On Tue, Sep 29, 2020 at 7:38 AM Rob Campbell wrote:
>
>> I would like to sync many subdirectories into one directory with no
>> subdirectories. I've tried
>>
>> rsync -rv --progress --include '*.jp*g' --include '*.png' --include
>> '*.dng' --include '*.raw' --include '*.nef' --include 'Duo' --include
>> 'DCIM' --include 'WhatsApp' --exclude '*' /my/phone/root/dir/
>> /my/backup/directory/for/images/
>>
>
> You didn't specify what isn't working as you expect. That command works
> fine for the 3 listed dir names as long as you either don't have matching
> files inside /my/phone/root/dir (or as long as it's ok to also copy those
> files) and as long as there aren't subdirs or files named the same as the 3
> top dirs you included. The latter can be fixed by anchoring your dir names
> and making them only match a dir (e.g. --include '/Duo/').  If you want to
> have the copy avoid files in the top dir you can either change all the
> file-based includes to have a "*/" prefix (such as "--include '*/*.png'
> ...") or you can change the dir includes into args and exclude '*/*'
> instead of "*".  The last option would look like this (I also tossed in -i):
>
> rsync -riv --progress --include '*.jp*g' --include '*.png' --include
> '*.dng' --include '*.raw' --include '*.nef' --exclude '*/*'
> /my/phone/root/dir/{Duo,DCIM,WhatsApp} /my/backup/directory/for/images/
>
> That assumes you've got bash to do the brace expansion, but you could
> change that into 3 arg paths if you need to. You may also want to add --del
> if you want rsync to delete inside the 3 listed dirs.
>
> I'm not sure why you listed an extra command with "NewDir" when it's not
> mentioned in the first command.  If that is an indication that you really
> want to copy all dirs under root/dir (not just the 3 named dirs in the
> first command) then you could use an include of "/*/" to match any dir in
> the root of the transfer, like this:
>
> rsync -riv --progress --include '*.jp*g' --include '*.png' --include
> '*.dng' --include '*.raw' --include '*.nef' --include '/*/' --exclude '*'
> /my/phone/root/dir/ /my/backup/directory/for/images/
>
> One last suggestion, I like to make the args shorter by using -f (filter)
> commands, so an include example is -f '+ *.png' and an exclude example is
> -f '- /*/' (those are identical to the equivalent include/exclude args, so
> that's just personal preference).
>
> ..wayne..
>
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. - branch master updated

2020-09-29 Thread Rsync CVS commit messages
The branch, master has been updated
   via  b115bc8a Silence a few more warnings.
   via  cd018c7a Use a better -Wno-pedantic heuristic.
  from  9fce0eb5 Avoid some pedantic errors & old warnings.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit b115bc8a5d5262ba06a573ef4f54eba806b1200a
Author: Wayne Davison 
Date:   Tue Sep 29 15:51:03 2020 -0700

Silence a few more warnings.

commit cd018c7a4c40a4d4f2aa3ea24f77282efe213c40
Author: Wayne Davison 
Date:   Tue Sep 29 15:17:29 2020 -0700

Use a better -Wno-pedantic heuristic.

---

Summary of changes:
 configure.ac  |  7 ---
 lib/sysacls.c | 14 +-
 uidlist.c | 26 ++
 3 files changed, 31 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/configure.ac b/configure.ac
index 1116e658..3fd7e5d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1053,9 +1053,10 @@ if test x"$GCC" = x"yes"; then
 else
# Our internal popt code cannot be compiled with pedantic warnings as 
errors, so try to
# turn off pedantic warnings (which will not lose the error for 
array-init overflow).
-   case `$CC -dumpversion 2>/dev/null` in
-   4.*) ;; # Early gcc doesn't understand -Wno-pedantic
-   *) CFLAGS="$CFLAGS -pedantic-errors -Wno-pedantic" ;;
+   # Older gcc versions don't understand -Wno-pedantic, so check if 
--help=warnings lists
+   # -Wpedantic and use that as a flag.
+   case `$CC --help=warnings 2>/dev/null | grep Wpedantic` in
+   *-Wpedantic*) CFLAGS="$CFLAGS -pedantic-errors -Wno-pedantic" ;;
esac
 fi
 fi
diff --git a/lib/sysacls.c b/lib/sysacls.c
index c23864fe..a9c3f1bd 100644
--- a/lib/sysacls.c
+++ b/lib/sysacls.c
@@ -1739,7 +1739,6 @@ int sys_acl_free_acl(SMB_ACL_T acl_d)
 int sys_acl_get_entry(SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
 {
struct acl_entry_link *link;
-   struct new_acl_entry *entry;
int keep_going;
 
if (entry_id == SMB_ACL_FIRST_ENTRY)
@@ -1765,10 +1764,15 @@ int sys_acl_get_entry(SMB_ACL_T theacl, int entry_id, 
SMB_ACL_ENTRY_T *entry_p)
for (keep_going = 0; keep_going < theacl->count; keep_going++)
link = link->nextp;
 
-   entry = *entry_p =  link->entryp;
+   *entry_p =  link->entryp;
 
-   DEBUG(10, ("*entry_p is %d\n", entry_p));
-   DEBUG(10, ("*entry_p->ace_access is %d\n", entry->ace_access));
+#if 0
+   {
+   struct new_acl_entry *entry = *entry_p;
+   DEBUG(10, ("*entry_p is %lx\n", (long)entry));
+   DEBUG(10, ("*entry_p->ace_access is %d\n", entry->ace_access));
+   }
+#endif
 
/* Increment count */
theacl->count++;
@@ -2297,7 +2301,7 @@ int sys_acl_create_entry(SMB_ACL_T *pacl, SMB_ACL_ENTRY_T 
*pentry)
 {
struct acl_entry_link *theacl;
struct acl_entry_link *acl_entryp;
-   struct acl_entry_link *temp_entry;
+   struct acl_entry_link *temp_entry = NULL;
int counting;
 
DEBUG(10, ("Entering the sys_acl_create_entry\n"));
diff --git a/uidlist.c b/uidlist.c
index 88847424..6100b503 100644
--- a/uidlist.c
+++ b/uidlist.c
@@ -63,6 +63,16 @@ struct idlist {
 static struct idlist *uidlist, *uidmap;
 static struct idlist *gidlist, *gidmap;
 
+static inline int id_eq_uid(id_t id, uid_t uid)
+{
+   return id == (id_t)uid;
+}
+
+static inline int id_eq_gid(id_t id, gid_t gid)
+{
+   return id == (id_t)gid;
+}
+
 static id_t id_parse(const char *num_str)
 {
id_t tmp, num = 0;
@@ -263,10 +273,10 @@ static struct idlist *recv_add_id(struct idlist 
**idlist_ptr, struct idlist *idm
else if (*name && id) {
if (idlist_ptr == ) {
uid_t uid;
-   id2 = user_to_uid(name, , False) ? uid : id;
+   id2 = user_to_uid(name, , False) ? (id_t)uid : id;
} else {
gid_t gid;
-   id2 = group_to_gid(name, , False) ? gid : id;
+   id2 = group_to_gid(name, , False) ? (id_t)gid : id;
}
} else
id2 = id;
@@ -289,11 +299,11 @@ uid_t match_uid(uid_t uid)
static struct idlist *last = NULL;
struct idlist *list;
 
-   if (last && uid == last->id)
+   if (last && id_eq_uid(last->id, uid))
return last->id2;
 
for (list = uidlist; list; list = list->next) {
-   if (list->id == uid)
+   if (id_eq_uid(list->id, uid))
break;
}
 
@@ -309,11 +319,11 @@ gid_t match_gid(gid_t gid, uint16 *flags_ptr)
static struct idlist *last = NULL;
struct idlist *list;
 
-   if (last && gid == last->id)
+   if (last && id_eq_gid(last->id, gid))

[SCM] The rsync repository. - branch master updated

2020-09-29 Thread Rsync CVS commit messages
The branch, master has been updated
   via  9fce0eb5 Avoid some pedantic errors & old warnings.
   via  33e94849 Handle early gcc versions that don't understand 
-Wno-pedantic.
   via  8f151118 Make gcc die on init overflow of an array.
   via  acca9d43 Expand the max name_num_item list size.
   via  58f464f4 Change `--info=skip2` messages & add info on attr changes.
   via  7eb59a91 Change from $build_cpu to $host_cpu as edo1 suggested.
  from  740ed11a Make the extra info on the "exists" messages optional.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit 9fce0eb5ab80da4d4d97bcde346c9b0b92432ac8
Author: Wayne Davison 
Date:   Tue Sep 29 14:47:31 2020 -0700

Avoid some pedantic errors & old warnings.

commit 33e94849b1013ff7e7b04e0a45ab2fffe2dd1e44
Author: Wayne Davison 
Date:   Tue Sep 29 14:22:40 2020 -0700

Handle early gcc versions that don't understand -Wno-pedantic.

commit 8f1511184ab5ad10110286cdef22195b5a67f01f
Author: Wayne Davison 
Date:   Tue Sep 29 13:04:41 2020 -0700

Make gcc die on init overflow of an array.

- Use -pedantic-errors with gcc to make an array-init fatal.
- Fix all the extra warnings that gcc outputs due to this option.
- Also add -Wno-pedantic to gcc if we're using the internal popt
  code (since it has lots of pedantic issues).

commit acca9d43d3143113088efa76d561b813735f1a73
Author: Wayne Davison 
Date:   Tue Sep 29 12:57:32 2020 -0700

Expand the max name_num_item list size.

commit 58f464f4daa1b1ee00c6afd898a19ca5cd81bf58
Author: Wayne Davison 
Date:   Wed Sep 23 09:26:10 2020 -0700

Change `--info=skip2` messages & add info on attr changes.

commit 7eb59a9152a2ace7bc7858e9915c671b3ab54344
Author: Wayne Davison 
Date:   Tue Sep 22 17:19:45 2020 -0700

Change from $build_cpu to $host_cpu as edo1 suggested.

---

Summary of changes:
 NEWS.md |  3 ++-
 configure.ac| 20 +---
 generator.c | 13 -
 lib/sysxattrs.c |  9 +
 loadparm.c  |  2 +-
 log.c   | 24 +---
 rsync.1.md  |  7 ---
 rsync.h |  2 +-
 tls.c   |  3 ++-
 token.c |  2 +-
 xattrs.c|  3 ++-
 11 files changed, 60 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/NEWS.md b/NEWS.md
index d978222c..bbc1b3fe 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -32,7 +32,8 @@
 
  - Added extra info to the "FILENAME exists" output of `--ignore-existing` when
`--info=skip2` is used.  The skip message becomes "FILENAME exists (INFO)"
-   where the INFO is one of uptodate, type differs, or differs.
+   where the INFO is one of "type change", "sum change" (requires `-c`), "file
+   change" (based on the quick check), "attr change", or "uptodate".
 
  - Some manpage improvements.
 
diff --git a/configure.ac b/configure.ac
index 109546a6..1116e658 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,7 +211,7 @@ CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g //'`
 
 if test x"$enable_simd" != x"no"; then
 # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required
-if test x"$build_cpu" = x"x86_64"; then
+if test x"$host_cpu" = x"x86_64"; then
AC_LANG(C++)
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include 
 #include 
@@ -283,8 +283,8 @@ AC_ARG_ENABLE(asm,
 AS_HELP_STRING([--disable-asm],[disable ASM optimizations]))
 
 if test x"$enable_asm" != x"no"; then
-if test x"$build_cpu" = x"x86_64"; then
-   ASM="$build_cpu"
+if test x"$host_cpu" = x"x86_64"; then
+   ASM="$host_cpu"
 elif test x"$enable_asm" = x"yes"; then
 AC_MSG_RESULT(unavailable)
 AC_MSG_ERROR(The ASM optimizations are currently x86_64 only.
@@ -1046,6 +1046,20 @@ elif test x"$ac_cv_header_popt_h" != x"yes"; then
 with_included_popt=yes
 fi
 
+if test x"$GCC" = x"yes"; then
+if test x"$with_included_popt" != x"yes"; then
+   # Turn pedantic warnings into errors to ensure an array-init overflow 
is an error.
+   CFLAGS="$CFLAGS -pedantic-errors"
+else
+   # Our internal popt code cannot be compiled with pedantic warnings as 
errors, so try to
+   # turn off pedantic warnings (which will not lose the error for 
array-init overflow).
+   case `$CC -dumpversion 2>/dev/null` in
+   4.*) ;; # Early gcc doesn't understand -Wno-pedantic
+   *) CFLAGS="$CFLAGS -pedantic-errors -Wno-pedantic" ;;
+   esac
+fi
+fi
+
 AC_MSG_CHECKING([whether to use included libpopt])
 if test x"$with_included_popt" = x"yes"; then
 AC_MSG_RESULT($srcdir/popt)
diff --git a/generator.c b/generator.c
index e3bc40a6..a890bdc3 100644
--- a/generator.c
+++ b/generator.c
@@ -182,7 +182,8 @@ static int remember_delete(struct file_struct *file, const 
char *fname, int flag
 static int read_delay_line(char *buf, int *flags_p)
 {

Re: strange crash with md5p8.diff + xxhash

2020-09-29 Thread Wayne Davison via rsync
On Sun, Sep 27, 2020 at 9:01 AM Madhu via rsync 
wrote:

> Turns out the comment in rsync.h: (struct name_num_obj):
> struct name_num_item list[8]; /* A big-enough len (we'll get a
> compile error if it is ever too small) */
>
> isn't correct. I don't get a compile error.


Gcc likes to generate just a warning, not an error, which is enough for me
to notice the issue and fix it.  However, it would be nice if it was an
actual error, so I'm tweaking configure.ac to specify -pedantic-errors
(sometimes followed by --Wno-pedantic) for gcc, which seems to turn it into
an error just fine.  I've also expanded the array a bit.

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync 3.1.3 dry run bug?

2020-09-29 Thread Wayne Davison via rsync
On Sun, Sep 27, 2020 at 12:27 PM Dipl.-Ing. Wolf-Dieter Pichler wrote:

> In this example output rsync says that it would just perform two
> group changes, BUT despite the -n option it actually synced some documents.
>

I doubt that very much, so I'd suggest checking on what else might be going
on.  Rsync has a bunch of safety functions with built-in dry-run checks
that keep it from making the changes that it itemizes that need to be
done.  And if it didn't even mention that a file needs to be updated,
there's no reason for it to have somehow made a secret change.  If you were
expecting to see a file change in the list of dry-run changes and it's not
there, then something prior to the rsync dry-run must have changed it.
Given that you're using -H, you might check if the affected file was linked
to a file that was recently changed in some other copy.

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Syncing multiple sub-directories to one directory

2020-09-29 Thread Wayne Davison via rsync
On Tue, Sep 29, 2020 at 7:38 AM Rob Campbell wrote:

> I would like to sync many subdirectories into one directory with no
> subdirectories. I've tried
>
> rsync -rv --progress --include '*.jp*g' --include '*.png' --include
> '*.dng' --include '*.raw' --include '*.nef' --include 'Duo' --include
> 'DCIM' --include 'WhatsApp' --exclude '*' /my/phone/root/dir/
> /my/backup/directory/for/images/
>

You didn't specify what isn't working as you expect. That command works
fine for the 3 listed dir names as long as you either don't have matching
files inside /my/phone/root/dir (or as long as it's ok to also copy those
files) and as long as there aren't subdirs or files named the same as the 3
top dirs you included. The latter can be fixed by anchoring your dir names
and making them only match a dir (e.g. --include '/Duo/').  If you want to
have the copy avoid files in the top dir you can either change all the
file-based includes to have a "*/" prefix (such as "--include '*/*.png'
...") or you can change the dir includes into args and exclude '*/*'
instead of "*".  The last option would look like this (I also tossed in -i):

rsync -riv --progress --include '*.jp*g' --include '*.png' --include
'*.dng' --include '*.raw' --include '*.nef' --exclude '*/*'
/my/phone/root/dir/{Duo,DCIM,WhatsApp} /my/backup/directory/for/images/

That assumes you've got bash to do the brace expansion, but you could
change that into 3 arg paths if you need to. You may also want to add --del
if you want rsync to delete inside the 3 listed dirs.

I'm not sure why you listed an extra command with "NewDir" when it's not
mentioned in the first command.  If that is an indication that you really
want to copy all dirs under root/dir (not just the 3 named dirs in the
first command) then you could use an include of "/*/" to match any dir in
the root of the transfer, like this:

rsync -riv --progress --include '*.jp*g' --include '*.png' --include
'*.dng' --include '*.raw' --include '*.nef' --include '/*/' --exclude '*'
/my/phone/root/dir/ /my/backup/directory/for/images/

One last suggestion, I like to make the args shorter by using -f (filter)
commands, so an include example is -f '+ *.png' and an exclude example is
-f '- /*/' (those are identical to the equivalent include/exclude args, so
that's just personal preference).

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Back-up differences. Raspberry Pi and Fedora

2020-09-29 Thread Kevin Korb via rsync
On 9/29/20 7:07 AM, joe--- via rsync wrote:
> unknown module Linux1
This would imply that "Linux1" is not defined in the rsyncd.conf file on
the backup server.  Of course since it is a NAS appliance I don't know
if you have any access to the config file.

1 check you could run is 'rsync root@server::'.  This would list the
modules the server is configured with (assuming listing is allowed).


-- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   https://sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,



signature.asc
Description: OpenPGP digital signature
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Back-up differences. Raspberry Pi and Fedora

2020-09-29 Thread joe--- via rsync
I am using the 'backup to a central backup server with 7 day 
incremental' example to archive three separate computers to identically 
configured (apart from name) shares on a Western Digital 'MyBookLive' 
NAS which has rsync enabled. The backup from two Raspberry Pi Computers 
operates without a problem but the backup from a Fedora 32 computer 
fails with an 'unknown module Linux1' error message. The only difference 
between the code in the .sh module for all three computers is the name 
of the share(Linux1 for the Fedora Computer) and the home directory.


#~ #!/bin/sh

# This script does personal backups to a rsync backup server. You will 
end up

# with a 7 day rotating incremental backup. The incrementals will go
# into subdirectories named after the day of the week, and the current
# full backup goes into a directory called "current"
# tri...@linuxcare.com

HOME=/home/XXX

# directory to backup
BDIR=/

# excludes file - this contains a wildcard pattern per line of files to 
exclude

EXCLUDES=$HOME/Documents/exclude.txt

# the name of the backup machine
BSERVER=r...@nnn.nnn.nnn.nnn

export RSYNC_PASSWORD=



BACKUPDIR=`date +%A`

OPTS="--force --ignore-errors --delete-excluded 
--exclude-from=/home/joe/Documents/exclude.txt

  --delete --backup --backup-dir=/$BACKUPDIR -a"

export PATH=$PATH:/bin:/usr/bin:/usr/local/bin

# the following line clears the last weeks incremental directory
[ -d $HOME/emptydir ] || mkdir $HOME/emptydir
rsync --delete -a $HOME/emptydir/ $BSERVER::Linux1/$BACKUPDIR/
rmdir $HOME/emptydir

# now the actual transfer
rsync $OPTS $BDIR $BSERVER::Linux1/current


Can anyone explain why this is happening please?

Joe Curtis



--
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Syncing multiple sub-directories to one directory

2020-09-29 Thread Rob Campbell via rsync
I would like to sync many subdirectories into one directory with no
subdirectories. I've tried

rsync -rv --progress --include '*.jp*g' --include '*.png' --include '*.dng'
--include '*.raw' --include '*.nef' --include 'Duo' --include 'DCIM'
--include 'WhatsApp' --exclude '*' /my/phone/root/dir/
/my/backup/directory/for/images/

I'd like to do this w/o separate rsync commands such as
rsync -rv --progress --include '*.jp*g' --include '*.png' --include '*.dng'
--include '*.raw' --include '*.nef' --exclude '*' /my/phone/root/dir/DCIM
/my/backup/directory/for/images/

rsync -rv --progress --include '*.jp*g' --include '*.png' --include '*.dng'
--include '*.raw' --include '*.nef' --exclude '*' /my/phone/root/dir/Duo
/my/backup/directory/for/images/

rsync -rv --progress --include '*.jp*g' --include '*.png' --include '*.dng'
--include '*.raw' --include '*.nef' --exclude '*'
/my/phone/root/dir/WhatsApp /my/backup/directory/for/images/
  -- This has subdirectories

rsync -rv --progress --include '*.jp*g' --include '*.png' --include '*.dng'
--include '*.raw' --include '*.nef' --exclude '*' /my/phone/root/dir/NewDir
/my/backup/directory/for/images/

~
When you are principled, set standards and stick to them some people will
fall out of your life; let them!
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html