Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #195664

Re: rsync - newbie question

From Tixy <tixy@yxit.co.uk>
Newsgroups linux.debian.user
Subject Re: rsync - newbie question
Date 2018-05-12 22:20 +0200
Message-ID <vOJ9L-2dF-1@gated-at.bofh.it> (permalink)
References (1 earlier) <vOF69-7KQ-7@gated-at.bofh.it> <vOF69-7KQ-5@gated-at.bofh.it> <vOGEV-xw-3@gated-at.bofh.it> <vOGYh-GD-3@gated-at.bofh.it> <vOHUm-1jz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 2018-05-12 at 13:58 -0500, Richard Owlett wrote:
> On 05/12/2018 12:50 PM, Tixy wrote:
> > On Sat, 2018-05-12 at 13:28 -0400, Jude DaShiell wrote:
> >> Another hierarchy in Linux not to sync is /system for the same reason
> >> you don't sync /proc.
> > 
> > Presumably you meant /sys ?
> > 
> > Basically, the OP probably don't want to try and sync mount points for
> > things that aren't ordinary filesystems and that's quite an extensive
> > and variable list.
> 
> I exclude /media for similar reasons. Or would exclude it anyway?

The command options I was thinking about would stop a command crossing
over into another filesystem. E.g. if my desktop automounts a USB stick
as /media/tixy/disks-label, that directory path would be part of the
root filesystem, but the actual contents of the USB stick that you see
under that path wouldn't be included in the command. So you'd just get
an empty directory with that path (/media/tixy/disks-label).

I googled for rsync man page [1] and it does seem to have the same
option as the cp command for this:

        -x, --one-file-system
            This tells rsync to avoid crossing a filesystem boundary
        when recursing. This does not limit the user's ability to
        specify items to copy from multiple filesystems, just rsync's
        recursion through the hierarchy of each directory that the user
        specified, and also the analogous recursion on the receiving
        side during deletion.
        
I don't know what it is you're trying to achieve. If your intent is to
create an identical copy of a system as some kind of backup, you'll also
need to make sure you copy file permissions, owners and special
attributes, duplicate hardlinks and possibly other things I haven't
thought of. That will require root privileges to execute and the correct
set of commandline options. Looking at that rsync man page I found, that
would be options like -p -X -H. (Note, I haven't used rsync before so
don't rely on my advice too much).

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

-- 
Tixy

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

rsync - newbie question Richard Owlett <rowlett@cloud85.net> - 2018-05-12 17:40 +0200
  Re: rsync - newbie question Richard Owlett <rowlett@cloud85.net> - 2018-05-12 18:00 +0200
    Re: rsync - newbie question Hans <hans.ullrich@loop.de> - 2018-05-12 18:00 +0200
    Re: rsync - newbie question Richard Owlett <rowlett@cloud85.net> - 2018-05-12 19:40 +0200
      Re: rsync - newbie question Hans <hans.ullrich@loop.de> - 2018-05-12 20:00 +0200
        Re: rsync - newbie question Richard Owlett <rowlett@cloud85.net> - 2018-05-12 21:00 +0200
          Re: rsync - newbie question Brian <ad44@cityscape.co.uk> - 2018-05-12 21:20 +0200
          Re: rsync - newbie question rhkramer@gmail.com - 2018-05-13 04:10 +0200
    Re: rsync - newbie question Jude DaShiell <jdashiel@panix.com> - 2018-05-12 19:40 +0200
      Re: rsync - newbie question Tixy <tixy@yxit.co.uk> - 2018-05-12 20:00 +0200
        Re: rsync - newbie question Richard Owlett <rowlett@cloud85.net> - 2018-05-12 21:00 +0200
          Re: rsync - newbie question Tixy <tixy@yxit.co.uk> - 2018-05-12 22:20 +0200
        Re: rsync - newbie question Rick Thomas <rbthomas@pobox.com> - 2018-05-12 22:20 +0200
  Re: rsync - newbie question Eero Volotinen <eero.volotinen@iki.fi> - 2018-05-12 18:00 +0200

csiph-web