I am pretty sure you can get away without stopping the source, so long as you 
don’t compact.

Also, if the files are not changing much, you can try using rsync to “catch 
up”, at the expense of more CPU on the source, but significantly less data to 
transfer overall.

(ensure partial and in-place are set)

On 18. März 2014 at 13:56:02, Stefan Klein ([email protected]) wrote:
> Hi,
>  
> from my understanding which might be wrong
>  
> 2014-03-18 13:31 GMT+01:00 Daniel Gonzalez :
>  
> > Thanks Dave,
> >
> > Yes, I understand that I need to restart it. Actually, I assume that both
> > source and destination must be stopped while copying:
> > - source to avoid data changes while copying, which can lead to
> > inconsistent data being copied
> >
>  
> A couchdb datafile is never inconsistent.
> see https://wiki.apache.org/couchdb/How_to_make_filesystem_backups
>  
>  
> > - destination to avoid that two processes (cp and couchdb) are stepping on
> > each writing on the same files.
> >
>  
> That's not how filehandles work (at least on Linux)
> open 4 terminals
> terminal 1:
> cd /tmp
> cat > file
> terminal 2:
> tail -f /tmp/file
> terminal 1:
> enter some text
> terminal 3:
> rm /tmp/file
> cat > /tmp/file
> terminal 4:
> tail -f /tmp/file
> terminal 1:
> enter some text
> terminal 3:
> enter some text
>  
>  
> as long the filehandle is not closed and re-opened it reads and writes to
> the "old" file, although the "old" file doesn't have a directory entry
> anymore.
>  
> So it should be fine to just copy over the file and post to _restart after
> the copy finished.
>  
> regards,
> Stefan
>  

--  
Dave Cottlehuber
Sent from my PDP11



Reply via email to