Re: Errors with program diagnostics (code 13) after rsync upgrade

2024-11-17 Thread Maxim Usatov via rsync

Dear All,

Found the issue. It was --progress. Without it the script runs fine 
under cron.


Regards,
Maxim




On 11/17/24 03:04, Robin Lee Powell wrote:

If you were on Linux I'd say this is an SELinux issue.  The FreeBSD
equivalent seems to be https://docs.freebsd.org/en/books/handbook/mac/

On Fri, Nov 15, 2024 at 04:08:27PM +, Maxim Usatov via rsync wrote:

Dear All,

Having weird rsync issues after upgrading FreeBSD from 13.2 to 14.1 and
rsync along with it. I cannot find any solution. Setup: doing rsync backup
from the root ZFS to an SSD mounted to /media/da0p1. The rsync is initiated
as root using /etc/crontab. The log:

2024/11/15 08:30:01 [61842] building file list
<... a few hundred files listed here - no error messages! ..>
2024/11/15 08:30:41 [61842] sent 15069073 bytes  received 77859 bytes  total
size 104786993196
2024/11/15 08:30:41 [61842] rsync error: errors with program diagnostics
(code 13) at log.c(245) [sender=3.3.0]

I assume code 13 is related to permissions, but given rsync is started as
root, why would this happen? The same rsync commands worked on all previous
versions of FreeBSD. It also fails with the same error to a remote SSH host.
If I run my rsync backup scripts manually as root then everything works
fine, so the issue appears only when the script is initiated by cron.

/etc/crontab entry:
30    *    *    *    *   root
/home/blackhaz/scripts/rsync-to-external-drive

rsync command in the script:

if mount | grep $TARGET_DISK; then
    nice rsync --log-file=$RSYNC_LOG_FILE \
    --archive --hard-links --delete --delete-excluded --sparse --xattrs
--numeric-ids --acls --progress \
    / /media/$TARGET_DISK/freebsd-backup

Would appreciate any pointers. Tried without--hard-links and getting the
same error.

Regards,
Maxim Usatov




--
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



--
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: Errors with program diagnostics (code 13) after rsync upgrade

2024-11-16 Thread Ian Z via rsync
On Sat, Nov 16, 2024 at 08:26:47AM GMT, Maxim Usatov via rsync wrote:

> Tried without nice, xattrs, acls and hard-links - same error.

Hmm okay, a real bug then :-) It likely has to do with the way cron
assumes the identity of the crontab owner.  I would ask on the
freebsd-questions list.  It may even be a known freebsd bug.

-- 
Ian

-- 
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: Errors with program diagnostics (code 13) after rsync upgrade

2024-11-16 Thread Maxim Usatov via rsync

Hi Ian,

Tried without nice, xattrs, acls and hard-links - same error.

Regards,
Maxim Usatov




On 11/15/24 17:42, Ian Z via rsync wrote:

On Fri, Nov 15, 2024 at 04:08:27PM GMT, Maxim Usatov via rsync wrote:


I assume code 13 is related to permissions, but given rsync is
started as root, why would this happen? The same rsync commands
worked on all previous versions of FreeBSD. It also fails with the
same error to a remote SSH host.  If I run my rsync backup scripts
manually as root then everything works fine, so the issue appears
only when the script is initiated by cron.
if mount | grep $TARGET_DISK; then
nice rsync --log-file=$RSYNC_LOG_FILE \
--archive --hard-links --delete --delete-excluded --sparse --xattrs
--numeric-ids --acls --progress \
/ /media/$TARGET_DISK/freebsd-backup

This is just a very wild and uneducated guess, but I would try it
without the nice.

Also: without the xattrs and acls. So 3 things to try :-P




--
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: Errors with program diagnostics (code 13) after rsync upgrade

2024-11-15 Thread Ian Z via rsync
On Fri, Nov 15, 2024 at 04:08:27PM GMT, Maxim Usatov via rsync wrote:

> I assume code 13 is related to permissions, but given rsync is
> started as root, why would this happen? The same rsync commands
> worked on all previous versions of FreeBSD. It also fails with the
> same error to a remote SSH host.  If I run my rsync backup scripts
> manually as root then everything works fine, so the issue appears
> only when the script is initiated by cron.

> if mount | grep $TARGET_DISK; then
> nice rsync --log-file=$RSYNC_LOG_FILE \
> --archive --hard-links --delete --delete-excluded --sparse --xattrs
> --numeric-ids --acls --progress \
> / /media/$TARGET_DISK/freebsd-backup

This is just a very wild and uneducated guess, but I would try it
without the nice.

Also: without the xattrs and acls. So 3 things to try :-P

-- 
Ian

-- 
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


Errors with program diagnostics (code 13) after rsync upgrade

2024-11-15 Thread Maxim Usatov via rsync

Dear All,

Having weird rsync issues after upgrading FreeBSD from 13.2 to 14.1 and 
rsync along with it. I cannot find any solution. Setup: doing rsync 
backup from the root ZFS to an SSD mounted to /media/da0p1. The rsync is 
initiated as root using /etc/crontab. The log:


2024/11/15 08:30:01 [61842] building file list
<... a few hundred files listed here - no error messages! ..>
2024/11/15 08:30:41 [61842] sent 15069073 bytes  received 77859 bytes  
total size 104786993196
2024/11/15 08:30:41 [61842] rsync error: errors with program diagnostics 
(code 13) at log.c(245) [sender=3.3.0]


I assume code 13 is related to permissions, but given rsync is started 
as root, why would this happen? The same rsync commands worked on all 
previous versions of FreeBSD. It also fails with the same error to a 
remote SSH host. If I run my rsync backup scripts manually as root then 
everything works fine, so the issue appears only when the script is 
initiated by cron.


/etc/crontab entry:
30    *    *    *    *   root 
/home/blackhaz/scripts/rsync-to-external-drive


rsync command in the script:

if mount | grep $TARGET_DISK; then
   nice rsync --log-file=$RSYNC_LOG_FILE \
   --archive --hard-links --delete --delete-excluded --sparse 
--xattrs --numeric-ids --acls --progress \

   / /media/$TARGET_DISK/freebsd-backup

Would appreciate any pointers. Tried without--hard-links and getting the 
same error.


Regards,
Maxim Usatov




--
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