Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: rsync does not keep user & owner ID

  1. #1
    Join Date
    Aug 2006
    Location
    Stockholm, Sweden
    Beans
    Hidden!

    rsync does not keep user & owner ID

    I have Ubuntu 20.10 and rsync 3.2.3
    I made a rsync between my computer and a Synology NAS backup (/nfs/BackUp).
    NFS is installed with 'autofs 5.1.6' where I have specified '-fstype=nfs4'
    This is what I do:

    sudo rsync -rhlv --delete /home/john/xxx /nfs/BackUp

    rsync does not display any error ...
    If I check the file 'xxx' with 'ls -la' it looks like this:

    1) /home/john/xxx gives me userID=1000,groupID=1000 which is OK
    2) /nfs/BackUP/xxx gives me userID=1024,groupID=users which is not OK
    3) NAS login gives me userID=admin,groupID=users which is not OK

    Why can't rsync keep userID,groupID?
    Is it a rsync problem or Synology NAS problem?

    Totally lost ...
    The Truth Is Out There

  2. #2
    Join Date
    May 2010
    Beans
    1,053

    Re: rsync does not keep user & owner ID

    https://linux.die.net/man/1/rsync

    May help. There are example commands with explanation. I suggest you setup some dummy data to play with then go prime time

  3. #3
    Join Date
    Aug 2006
    Location
    Stockholm, Sweden
    Beans
    Hidden!

    Re: rsync does not keep user & owner ID

    Well ... that's basically man page
    I have tried to change owner, group and both but it complains 'Operation not permitted'
    Still on square one ...
    The Truth Is Out There

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: rsync does not keep user & owner ID

    What is actual format of partitions you are copying to?
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Aug 2006
    Location
    Stockholm, Sweden
    Beans
    Hidden!

    Re: rsync does not keep user & owner ID

    Since Synology NAS use a Linux operating system it is ext4
    The Truth Is Out There

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,534
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: rsync does not keep user & owner ID

    Use the -a ("archive") switch.
    Code:
    rsync -av source target
    is all you need. It will recurse through directories and preserve ownerships, modification times, etc.

    The -v switch generates a list of all the files transferred. You can omit that if you like and just use "rsync -a". I recommend doing a "dry run" first with "-avn" to make sure the correct files are being transferred. Then drop the "n" to execute the transfer.
    Last edited by SeijiSensei; 4 Weeks Ago at 12:37 AM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Aug 2006
    Location
    Stockholm, Sweden
    Beans
    Hidden!

    Re: rsync does not keep user & owner ID

    'rsync -av source target' tells me that I don't have permission ... it seems that Synology NAS has its own internal rules
    The Truth Is Out There

  8. #8
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,534
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: rsync does not keep user & owner ID

    Run it as root with sudo.
    Code:
    sudo rsync -av source target
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  9. #9
    Join Date
    Aug 2006
    Location
    Stockholm, Sweden
    Beans
    Hidden!

    Re: rsync does not keep user & owner ID

    I did
    The Truth Is Out There

  10. #10
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: rsync does not keep user & owner ID

    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •