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


Groups > linux.debian.user > #195648 > unrolled thread

rsync - newbie question

Started byRichard Owlett <rowlett@cloud85.net>
First post2018-05-12 17:40 +0200
Last post2018-05-12 18:00 +0200
Articles 14 — 8 participants

Back to article view | Back to linux.debian.user


Contents

  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

#195648 — rsync - newbie question

FromRichard Owlett <rowlett@cloud85.net>
Date2018-05-12 17:40 +0200
Subjectrsync - newbie question
Message-ID<vOEMN-7AR-11@gated-at.bofh.it>
In another thread it was suggested that I use:    > rsync -avzh --delete 
-n <fromdirectory> <todirectory>

I tried it and got ~200 error messages of form:

> file has vanished: "/proc/10/exe"

> file has vanished: "/proc/10/task/10/exe"

> file has vanished: "/proc/101/exe"

> file has vanished: "/proc/101/task/101/exe"

> file has vanished: "/proc/10146/exe"

> file has vanished: "/proc/10146/task/10146/exe"

> file has vanished: "/proc/10300/cwd"

> file has vanished: "/proc/10300/root"

> file has vanished: "/proc/10300/exe"

Spot checking properties of those showed that although they had multiple 
sub-directories the content was "0 bytes".

Browsing [https://manpages.debian.org/stretch/manpages/proc.5.en.html] 
implied that excluding everything under /proc would be reasonable.

Am I correct?
TIA

[toc] | [next] | [standalone]


#195649

FromRichard Owlett <rowlett@cloud85.net>
Date2018-05-12 18:00 +0200
Message-ID<vOF69-7KQ-5@gated-at.bofh.it>
In reply to#195648
On 05/12/2018 10:47 AM, Eero Volotinen wrote:
> You should not sync /proc. it's not normal directory
> 
> Eero

Thank you.

[toc] | [prev] | [next] | [standalone]


#195650

FromHans <hans.ullrich@loop.de>
Date2018-05-12 18:00 +0200
Message-ID<vOF6a-7KQ-13@gated-at.bofh.it>
In reply to#195649
Am Samstag, 12. Mai 2018, 17:54:13 CEST schrieb Richard Owlett:
As Eero said, do not sync /proc, you can use the --exclude option.

There is a good description here, how to exclude things:
https://www.thegeekstuff.com/2011/01/rsync-exclude-files-and-folders/?
utm_source=feedburner

Have fun!

Hans

> On 05/12/2018 10:47 AM, Eero Volotinen wrote:
> > You should not sync /proc. it's not normal directory
> > 
> > Eero
> 
> Thank you.

[toc] | [prev] | [next] | [standalone]


#195652

FromRichard Owlett <rowlett@cloud85.net>
Date2018-05-12 19:40 +0200
Message-ID<vOGEV-xw-1@gated-at.bofh.it>
In reply to#195649
On 05/12/2018 12:28 PM, Jude DaShiell wrote:
> Another hierarchy in Linux not to sync is /system for the same reason 
> you don't sync /proc.

thank you.

[toc] | [prev] | [next] | [standalone]


#195657

FromHans <hans.ullrich@loop.de>
Date2018-05-12 20:00 +0200
Message-ID<vOGYh-GD-5@gated-at.bofh.it>
In reply to#195652
Am Samstag, 12. Mai 2018, 19:37:40 CEST schrieb Richard Owlett:
Please note, the directory is NOT /system, it is /sys.
Juda got a little typo. :)

However, I would avoid /proc, /sys, /tmp and /lost+found

Hint: If you might put /home on another partition, you can easily install or 
sync a new system, but leave the user settings. In that case, you should of 
course also exclude /home.

Best 

Hans
> On 05/12/2018 12:28 PM, Jude DaShiell wrote:
> > Another hierarchy in Linux not to sync is /system for the same reason
> > you don't sync /proc.
> 
> thank you.

[toc] | [prev] | [next] | [standalone]


#195659

FromRichard Owlett <rowlett@cloud85.net>
Date2018-05-12 21:00 +0200
Message-ID<vOHUm-1jz-1@gated-at.bofh.it>
In reply to#195657
On 05/12/2018 12:48 PM, Hans wrote:
> Am Samstag, 12. Mai 2018, 19:37:40 CEST schrieb Richard Owlett:
> Please note, the directory is NOT /system, it is /sys.
> Juda got a little typo. :)

I won't complain too much. Otherwise peuple will start talking about mine ;/

> 
> However, I would avoid /proc, /sys, /tmp and /lost+found
> 
> Hint: If you might put /home on another partition, you can easily install or
> sync a new system, but leave the user settings. In that case, you should of
> course also exclude /home.

I'll keep that in mind.
But you started me thinking about how my use case differs from any 
normal user.

> 
> Best
> 
> Hans
>> On 05/12/2018 12:28 PM, Jude DaShiell wrote:
>>> Another hierarchy in Linux not to sync is /system for the same reason
>>> you don't sync /proc.
>>
>> thank you.
> 
> 
> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#195661

FromBrian <ad44@cityscape.co.uk>
Date2018-05-12 21:20 +0200
Message-ID<vOIdH-1Fb-7@gated-at.bofh.it>
In reply to#195659
On Sat 12 May 2018 at 13:54:53 -0500, Richard Owlett wrote:

> I'll keep that in mind.
> But you started me thinking about how my use case differs from any normal
> user.

You would have to put yourself in the thought mode of a normal user
(whatever he is) instead of seeing youself as having special needs
or requirements.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#195667

Fromrhkramer@gmail.com
Date2018-05-13 04:10 +0200
Message-ID<vOOCt-5Bp-1@gated-at.bofh.it>
In reply to#195659
On Saturday, May 12, 2018 02:54:53 PM Richard Owlett wrote:
> But you started me thinking about how my use case differs from any
> normal user.

Yup, it appears so. ;-)

[toc] | [prev] | [next] | [standalone]


#195654

FromJude DaShiell <jdashiel@panix.com>
Date2018-05-12 19:40 +0200
Message-ID<vOGEV-xw-3@gated-at.bofh.it>
In reply to#195649
On Sat, 12 May 2018, Richard Owlett wrote:

> Date: Sat, 12 May 2018 11:54:13
> From: Richard Owlett <rowlett@cloud85.net>
> To: debian-user <debian-user@lists.debian.org>
> Subject: Re: rsync - newbie question
> Resent-Date: Sat, 12 May 2018 15:54:40 +0000 (UTC)
> Resent-From: debian-user@lists.debian.org
> 
> On 05/12/2018 10:47 AM, Eero Volotinen wrote:
>>  You should not sync /proc. it's not normal directory
>>
>>  Eero
>
> Thank you.
>
>
>
>

-- 
Another hierarchy in Linux not to sync is /system for the same reason you 
don't sync /proc.

[toc] | [prev] | [next] | [standalone]


#195656

FromTixy <tixy@yxit.co.uk>
Date2018-05-12 20:00 +0200
Message-ID<vOGYh-GD-3@gated-at.bofh.it>
In reply to#195654
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.

Some commands have options to stop them looking at other filsytsems (cp
has -x and find has -xdev) I don't know about rsync (I don't have it
installed).

-- 
Tixy

[toc] | [prev] | [next] | [standalone]


#195660

FromRichard Owlett <rowlett@cloud85.net>
Date2018-05-12 21:00 +0200
Message-ID<vOHUm-1jz-3@gated-at.bofh.it>
In reply to#195656
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?

> 
> Some commands have options to stop them looking at other filsytsems (cp
> has -x and find has -xdev) I don't know about rsync (I don't have it
> installed).
> 

[toc] | [prev] | [next] | [standalone]


#195664

FromTixy <tixy@yxit.co.uk>
Date2018-05-12 22:20 +0200
Message-ID<vOJ9L-2dF-1@gated-at.bofh.it>
In reply to#195660
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

[toc] | [prev] | [next] | [standalone]


#195663

FromRick Thomas <rbthomas@pobox.com>
Date2018-05-12 22:20 +0200
Message-ID<vOJ9L-2dF-3@gated-at.bofh.it>
In reply to#195656
Yes, rsync has a “-x" option, which does the same thing as for cp: it keeps it from crossing filesystem boundaries.  If you are using rsync to back up whole filesystems, it’s indispensable.

Rick

On May 12, 2018, at 10:50 AM, Tixy <tixy@yxit.co.uk> wrote:

> Some commands have options to stop them looking at other filsytsems (cp
> has -x and find has -xdev) I don't know about rsync (I don't have it
> installed).

[toc] | [prev] | [next] | [standalone]


#195651

FromEero Volotinen <eero.volotinen@iki.fi>
Date2018-05-12 18:00 +0200
Message-ID<vOF69-7KQ-7@gated-at.bofh.it>
In reply to#195648

[Multipart message — attachments visible in raw view] — view raw

You should not sync /proc. it's not normal directory

Eero

la 12. toukok. 2018 klo 18.37 Richard Owlett <rowlett@cloud85.net>
kirjoitti:

> In another thread it was suggested that I use:    > rsync -avzh --delete
> -n <fromdirectory> <todirectory>
>
> I tried it and got ~200 error messages of form:
>
> > file has vanished: "/proc/10/exe"
>
> > file has vanished: "/proc/10/task/10/exe"
>
> > file has vanished: "/proc/101/exe"
>
> > file has vanished: "/proc/101/task/101/exe"
>
> > file has vanished: "/proc/10146/exe"
>
> > file has vanished: "/proc/10146/task/10146/exe"
>
> > file has vanished: "/proc/10300/cwd"
>
> > file has vanished: "/proc/10300/root"
>
> > file has vanished: "/proc/10300/exe"
>
> Spot checking properties of those showed that although they had multiple
> sub-directories the content was "0 bytes".
>
> Browsing [https://manpages.debian.org/stretch/manpages/proc.5.en.html]
> implied that excluding everything under /proc would be reasonable.
>
> Am I correct?
> TIA
>
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web