Groups | Search | Server Info | Login | Register


Groups > alt.os.linux > #81959

Re: rsync Question

Path csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Dan Purgert <dan@djph.net>
Newsgroups alt.os.linux, uk.comp.os.linux
Subject Re: rsync Question
Date Tue, 21 Oct 2025 13:49:01 -0000 (UTC)
Organization A noiseless patient Spider
Lines 29
Message-ID <slrn10ff3qd.2p7.dan@djph.net> (permalink)
References <10d80d9$3tola$1@dont-email.me>
Injection-Date Tue, 21 Oct 2025 13:49:02 +0000 (UTC)
Injection-Info dont-email.me; posting-host="6374a5741f49a1d7b0cc20449b38214e"; logging-data="4167077"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+U/prAGBozp0lIZ0yW96B3I1fSkxyExfg="
User-Agent slrn/1.0.3 (Linux)
Cancel-Lock sha1:/ux+PJh/XgZwOKEy90a1VVqZ1uk=
Xref csiph.com alt.os.linux:81959 uk.comp.os.linux:23800

Cross-posted to 2 groups.

Show key headers only | View raw


On 2025-10-21, Java Jive wrote:
> Having made a slight cock-up, I want to use rsync to move all the files 
> that exist on one server but not the other into a separate heirarchy.
>
> More fully:
>
> I have two identical servers, the second of which rsyncs itself from the 
> other overnight.  This morning, due to an oversight, I put a load of 
> files into a directory structure that were intended to go into a 
> subfolder of it.  What I want to do is rsync from the second server to 
> the first and move files that only exist on the first into a directory 
> tree elsewhere on the server, so that then I can move that extraneous 
> tree back into the originally intended subfolder.  Something like this:

rsync doesn't 'move'.

*IF* you've already moved the relevant files from /src/wrongdir to
/src/correctdir ; then you can rsync with "--delete" to delete those
files on /dest/ that are no longer in /src/ (i.e. 'got moved from
/src/wrong/ to /src/correct/').

I would definitely do the --dry-run, and read it *very* closely, to make
sure the rsync isn't removing more than I expect.


-- 
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1  E067 6D65 70E5 4CE7 2860

Back to alt.os.linux | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

rsync Question Java Jive <java@evij.com.invalid> - 2025-10-21 14:04 +0100
  Re: rsync Question Dan Purgert <dan@djph.net> - 2025-10-21 13:49 +0000
    Re: rsync Question Java Jive <java@evij.com.invalid> - 2025-10-21 15:35 +0100
      Re: rsync Question Dan Purgert <dan@djph.net> - 2025-10-21 15:37 +0000
        Re: rsync Question Java Jive <java@evij.com.invalid> - 2025-10-21 17:44 +0100
          Re: rsync Question Dan Purgert <dan@djph.net> - 2025-10-21 19:52 +0000
            Re: rsync Question Java Jive <java@evij.com.invalid> - 2025-10-22 13:40 +0100

csiph-web