Results 1 to 3 of 3

Thread: Rsync Restore: Permissions and Ownership Questions

  1. #1

    Default Rsync Restore: Permissions and Ownership Questions

    I am trying to restore a bunch of multimedia directories with about 2 TiB of data in total from a NAS to workstation.
    The rsync restore function on the NAS states:-

    You must enable Rsync server on the remote machine in order to use this function
    I have set up rsyncd.conf as follows:

    Code:
    gid = users
    read only = false
    use chroot = false
    transfer logging = true
    log format = %h %o %f %l %b
    log file = /var/log/rsyncd.log
    pid file = /var/run/rsyncd.pid
    # hosts allow = trusted.hosts
    slp refresh = 3600
    
    
    [restore]
        path = /data/mastermedia
        comment = NAS restore location
        gid = users
        uid = alastair
         list = yes
    This works after a fashion when I run rsync from the NAS box but I always get "Failed" at the end of the process and the log files are full of permission denied type of errors.

    My question is how does the rsync process handle indentity oe the sender of the files, and permissions in general when the permissions on the files being copied may differ from the directories into which they are going?

    I really would like to be able to run this restoration exercise without getting the "Failed" message.
    If anybody has time to help on this it would be appreciated.
    Budgie2

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,527
    Blog Entries
    15

    Default Re: Rsync Restore: Permissions and Ownership Questions

    On Sun 15 Mar 2015 06:46:01 PM CDT, Budgie2 wrote:


    I am trying to restore a bunch of multimedia directories with about 2
    TiB of data in total from a NAS to workstation.
    The rsync restore function on the NAS states:-

    > You must enable Rsync server on the remote machine in order to use
    > this function


    I have set up rsyncd.conf as follows:


    Code:
    --------------------
    gid = users
    read only = false
    use chroot = false
    transfer logging = true
    log format = %h %o %f %l %b
    log file = /var/log/rsyncd.log
    pid file = /var/run/rsyncd.pid
    # hosts allow = trusted.hosts
    slp refresh = 3600


    [restore]
    path = /data/mastermedia
    comment = NAS restore location
    gid = users
    uid = alastair
    list = yes


    --------------------


    This works after a fashion when I run rsync from the NAS box but I
    always get "Failed" at the end of the process and the log files are full
    of permission denied type of errors.

    My question is how does the rsync process handle indentity oe the sender
    of the files, and permissions in general when the permissions on the
    files being copied may differ from the directories into which they are
    going?

    I really would like to be able to run this restoration exercise without
    getting the "Failed" message.
    If anybody has time to help on this it would be appreciated.
    Budgie2


    Hi
    From the rsync man page (permissions);
    [QUOTE]
    In summary: to give destination files (both old and new) the source
    permissions, use --perms. To give new files the destination-default
    permissions (while leaving existing files unchanged), make sure that
    the --perms option is off and use --chmod=ugo=rwX (which ensures that
    all non-masked bits get enabled). If you’d care to make this
    latter behavior easier to type, you could define a popt alias for
    it, such as putting this line in the file ~/.popt (the following
    defines the -Z option, and includes --no-g to use the default group of
    the destination dir):

    rsync alias -Z --no-p --no-g --chmod=ugo=rwX
    [/CODE]
    So I would assume you need to look at adding the --no-g and --chmod
    options as required.

    Perhaps an example of a file on the NAS with name,user,group and
    permissions and what you expect it to be on the target.

    --
    Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  3. #3

    Default Re: Rsync Restore: Permissions and Ownership Questions

    Hi Malcolm,
    Many thanks for the reply.

    Unfortunately in running rsync to restore from the NAS box I have been using the web interface and the offered menus rather than console and CLI. There are a few options offered but nothing evident on permissions and ownership although it may be elsewhere in the NAS system. I shall keep delving.

    Meanwhile I can get a cli on the NAS by using SSH so will try something there but must get on with some work today. Will try in next free time!!!
    Thanks again,
    Budgie2

Posting Permissions

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