Hello, Rsync. --log-file-format="|%i|%B|%U|%G|%l|[%M]|// %n" After backup log to get this line: 2017/01/25 17:30:09 [8781] |hf |rw-r--r--|500|DEFAULT|83875|[2014/02/10-18:22:09]|// xml_error.txt groupID = DEFAULT The server looks like this: ls -lan | grep xml_error.txt -rw-r--r-- 1 500 1002 83875 Фев 10 2014 xml_error.txt groupID = 1002 The documentation is written: https://download.samba.org/pub/rsync/rsyncd.conf.html %G the gid of the file (decimal) or "DEFAULT" Why "DEFAULT"? What to do? In order to log file recorded GID = 1002 but not "DEFAULT" for the file named xml_error.txt -- Yours faithfully, Sergey Dugin mailto:drug at qwarta.ru QWARTA
You didn't include the rest of your command line. Did you tell rsync to copy the group with either --archive or --group? If not then it is telling you that it is just using your default GID as it was told to do. On 01/25/2017 10:22 AM, Дугин Сергей wrote:> Hello, Rsync. > > --log-file-format="|%i|%B|%U|%G|%l|[%M]|// %n" > > After backup log to get this line: > 2017/01/25 17:30:09 [8781] |hf |rw-r--r--|500|DEFAULT|83875|[2014/02/10-18:22:09]|// xml_error.txt > > groupID = DEFAULT > > > > The server looks like this: > ls -lan | grep xml_error.txt > -rw-r--r-- 1 500 1002 83875 Фев 10 2014 xml_error.txt > > groupID = 1002 > > The documentation is written: > https://download.samba.org/pub/rsync/rsyncd.conf.html > %G the gid of the file (decimal) or "DEFAULT" > > Why "DEFAULT"? > > > What to do? In order to log file recorded GID = 1002 but not "DEFAULT" for the file named xml_error.txt > >-- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._., Kevin Korb Phone: (407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. Kevin at FutureQuest.net (work) Orlando, Florida kmk at sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._., -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/rsync/attachments/20170125/42282cef/signature.sig>
-qaHv -ii --no-D --log-file-format="|%i|%B|%U|%G|%l|[%M]|// %n" --delete --numeric-ids --log-file=result.log --stats> You didn't include the rest of your command line. Did you tell rsync to > copy the group with either --archive or --group? If not then it is > telling you that it is just using your default GID as it was told to do.> On 01/25/2017 10:22 AM, Дугин Сергей wrote: >> Hello, Rsync. >> >> --log-file-format="|%i|%B|%U|%G|%l|[%M]|// %n" >> >> After backup log to get this line: >> 2017/01/25 17:30:09 [8781] |hf |rw-r--r--|500|DEFAULT|83875|[2014/02/10-18:22:09]|// xml_error.txt >> >> groupID = DEFAULT >> >> >> >> The server looks like this: >> ls -lan | grep xml_error.txt >> -rw-r--r-- 1 500 1002 83875 Фев 10 2014 xml_error.txt >> >> groupID = 1002 >> >> The documentation is written: >> https://download.samba.org/pub/rsync/rsyncd.conf.html >> %G the gid of the file (decimal) or "DEFAULT" >> >> Why "DEFAULT"? >> >> >> What to do? In order to log file recorded GID = 1002 but not "DEFAULT" for the file named xml_error.txt >> >>-- Yours faithfully, Sergey Dugin mailto:drug at qwarta.ru QWARTA
On Wed, Jan 25, 2017 at 7:22 AM, Дугин Сергей <drug at qwarta.ru> wrote:> %G the gid of the file (decimal) or "DEFAULT" > > Why "DEFAULT"? >The DEFAULT usually indicates that rsync isn't preserving the gid value at all (so it doesn't have any group info for the file) but it can also mean that the receiver doesn't have permission to set that group value. This can happen if the receiver is not running as root and the desired group isn't in the user's group membership. In the case of your options, it looks like you either need to ensure that the receiving rsync is running as root, or (if it is running as an admin user that is not UID 0) tell rsync to assume that it has super-user powers via the --super option. ..wayne.. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20170220/d9fc0d77/attachment.html>
Hello. I need the correct UID and GID to be written to the log file when backing up, rather than being installed on the files in the copy. When using the fake-super option, symlinks are stored as files, consequently, an inexperienced user will not be able to turn this file into a symlink just by copying it And then analyzing the log I can write a bash script to restore UID and GID files On 20/02/2017 10:43 PM, Sergey Dugin wrote:> On Wed, Jan 25, 2017 at 7:22 AM, Sergey Dugin <drug at qwarta.ru> wrote:> %G the gid of the file (decimal) or "DEFAULT"> Why "DEFAULT"?> The DEFAULT usually indicates that rsync isn't preserving the gid > value at all (so it doesn't have any group info for the file) but it > can also mean that the receiver doesn't have permission to set that > group value. This can happen if the receiver is not running as root > and the desired group isn't in the user's group membership.> In the case of your options, it looks like you either need to > ensure that the receiving rsync is running as root, or (if it is > running as an admin user that is not UID 0) tell rsync to assume > that it has super-user powers via the --super option.> ..wayne..Yours faithfully, Sergey Dugin mailto:drug at qwarta.ru QWARTA