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


Groups > linux.debian.user > #187227

Re: dirs mirror

From Darac Marjal <mailinglist@darac.org.uk>
Newsgroups linux.debian.user
Subject Re: dirs mirror
Date 2017-09-26 10:50 +0200
Message-ID <utTJ0-2nL-29@gated-at.bofh.it> (permalink)
References <utHHQ-2sG-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

On Mon, Sep 25, 2017 at 09:57:54PM +0200, Pol Hallen wrote:
>Hi folks :-)
>
>I'd like create a mirror between 2 dirs: one local dir
>
>/home/user/testA
>
>and
>
>/home/user/testB
>this "testB" is a samba mounted share dir (//ip/remote_share 
>/home/user/testB)
>
>any idea?

It depends on how close you want those mirrors to be. If they are 
absolutely identical:

 ln -s ../testB /home/user/testA

will create a symbolic link between the two directories. You can 'cd' 
into either testA or testB and see identical files, changes happen 
immediately etc. A symbolic link essentially allows you to give a 
directory a second name.

If this is for backup purposes and you want to periodically bring testB 
up-to-date with testA, then rsync is your best choice:

 rsync -avP --delete /home/user/testA /home/user/testB

This is a one-way synchronisation. testB becomes identical to testA, and 
any changes in testB are lost. If you need two-way synchronisation 
(testA and testB have changed, but need to come to a common state), then 
look at the "unison" package.

>
>thanks for help!
>
>Pol
>

-- 
For more information, please reread.

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


Thread

dirs mirror Pol Hallen <deben@fuckaround.org> - 2017-09-25 22:00 +0200
  Re: dirs mirror David Christensen <dpchrist@holgerdanske.com> - 2017-09-26 05:00 +0200
    Re: dirs mirror David Christensen <dpchrist@holgerdanske.com> - 2017-09-26 05:20 +0200
    Re: dirs mirror Cindy-Sue Causey <butterflybytes@gmail.com> - 2017-09-26 18:50 +0200
  Re: dirs mirror Darac Marjal <mailinglist@darac.org.uk> - 2017-09-26 10:50 +0200

csiph-web