Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO:Local Rsync Mirror
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
flybynite
l33t
l33t


Joined: 06 Dec 2002
Posts: 620

PostPosted: Sat Aug 19, 2006 8:18 pm    Post subject: Reply with quote

melinux wrote:
Is there a problem with the latest rsync?
When I start it I get this error:
* Starting rsyncd ...
rsync: --safe-links: unknown option (in daemon mode)
(Type "rsync --daemon --help" for assistance with daemon mode.)
rsync error: syntax or usage error (code 1) at options.c(857) [client=2. [ !! ]



--safe-links is no longer needed or supported in daemon mode. I've updated the howto to reflect this. Just remove --safe-links and it should work fine.
Back to top
View user's profile Send private message
katafitos
n00b
n00b


Joined: 22 Nov 2006
Posts: 56
Location: Greece

PostPosted: Tue Jun 12, 2007 4:17 pm    Post subject: Reply with quote

I have a problem with the Local Rsync Mirror
When I test sync with emerge --sync I get this
Code:
>>> Starting rsync with rsync://192.xxx.xxx.xxx/gentoo-portage...
>>> Checking server timestamp ...
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(609) [receiver=2.6.9]


I can't figure out what's the cause of this. Any idea?
Back to top
View user's profile Send private message
shrike
Apprentice
Apprentice


Joined: 20 Feb 2004
Posts: 185
Location: Closer to home

PostPosted: Thu Jun 21, 2007 2:01 am    Post subject: Reply with quote

katafitos,

This is a long shot but check the RSYNC_TIMEOUT value in /etc/make.conf. Default is 30. I recall similiar error msgs when I had that set to a value of 5.

shrike
Back to top
View user's profile Send private message
katafitos
n00b
n00b


Joined: 22 Nov 2006
Posts: 56
Location: Greece

PostPosted: Thu Jun 21, 2007 2:24 pm    Post subject: Reply with quote

shrike wrote:
katafitos,

This is a long shot but check the RSYNC_TIMEOUT value in /etc/make.conf. Default is 30. I recall similiar error msgs when I had that set to a value of 5.

shrike


Thank you very much shrike!! :D

that did the trick!!
Back to top
View user's profile Send private message
Guybrush
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2003
Posts: 99
Location: 48°27'N, 11°8'O

PostPosted: Wed Nov 14, 2007 6:50 pm    Post subject: Reply with quote

For all with a local rsync mirror who have problems syncing and get the error message "rsync: on remote machine: --no-specials: unknown option":

I had a problem syncing my local portage mirror with the portage tree. It seems that the meaning of the rsync-parameter --devices has changed as of rsync version 2.6.7. Just add "--special" to the list of rsync parameters and it should work again. I also have filed a bug report. Hope that helps.
Back to top
View user's profile Send private message
carpman
Advocate
Advocate


Joined: 20 Jun 2002
Posts: 2202
Location: London - UK

PostPosted: Thu Nov 15, 2007 5:15 pm    Post subject: Reply with quote

Hello, am getting following error on starting deamon

Code:

/etc/init.d/rsyncd start
 * Starting rsync daemon ...
rsync: --timeout=300: unknown option (in daemon mode)
(Type "rsync --daemon --help" for assistance with daemon mode.)
rsync error: syntax or usage error (code 1) at options.c(878) [client=2.6.9]     



Code:

cat /etc/init.d/rsyncd
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/files/rsyncd.init.d,v 1.5 2007/02/23 11:33:59 uberlord Exp $

depend() {
        use net
}

# FYI: --sparce seems to cause problems.
RSYNCOPTS="--daemon  --timeout=300"

start() {
ebegin "Starting rsync daemon"
start-stop-daemon --start --quiet --pidfile /var/run/rsyncd.pid --nicelevel 15 --exec /usr/bin/rsync -- ${RSYNCOPTS}
eend $?
}

stop() {
ebegin "Stopping rsync daemon"
start-stop-daemon --stop --quiet --pidfile /var/run/rsyncd.pid
eend $?
}



cheers
_________________
Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb
Back to top
View user's profile Send private message
zappatized
n00b
n00b


Joined: 18 Aug 2012
Posts: 21

PostPosted: Wed Aug 29, 2012 2:26 pm    Post subject: Quick n dirty rsync/distfiles mirror (for other newbies) Reply with quote

I have been trying to set up a local (personal) mirror for some time. There are a lot of guides but for now I'm just looking for a simple solution that I can implement right away. It was fairly straightforward to follow the official guide for local portage tree syncing, but trying to mirror distfiles proved more elusive. To save others the trouble of sorting through numerous forum posts I'd like to share my setup culled from those posts. This setup requires no packages beyond what is included in the base system.

Code:
# /etc/rsyncd.conf

uid = nobody
gid = nobody
use chroot = yes
munge symlinks = yes

# Limit access to private LAN (substitute with 10.0.0.0/24 depending on router, check with '$ route')
hosts allow = 192.168.1.0/24
max connections = 15

# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
motd file = /etc/motd.rsyncd

# This provides a separate log file
log file = /var/log/rsync.log
# This will log every file transferred - up to 85,000+ per user, per sync
#transfer logging = yes

log format = %t %a %m %f %b
syslog facility = local3
timeout = 300

# Simple example for enabling your own local rsync server
[gentoo-portage]
   path = /usr/./portage
   comment = Funtoo Portage tree
   exclude = /distfiles /packages

# For distributing Portage sources (distfiles) to internal clients
[gentoo-distfiles]
   path = /usr/./portage
   comment = Gentoo Distfiles mirror
   include = /distfiles

No changes were made to /etc/init.d/rsyncd. /etc/conf.d/rsyncd contains the following options:
Code:
RSYNC_OPTS="--quiet --recursive --links --perms --times --devices --delete --nicelevel 15"

Start the rsyncd daemon on the local server and add to default runlevel. Edit make.conf for client computers:
Code:
SYNC="rsync://<localserver ip or name>/gentoo-portage"
GENTOO_MIRRORS="rsync://<localserver ip or name>/gentoo-distfiles ..."

I haven't set up a binhost yet but if I do I would start by duplicating the rsync distfiles module for the packages dir and then configure PORTAGE_BINHOST on the client(s) and PORTAGE_BINHOST_HEADER_URI on the server.
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 259

PostPosted: Sat Jan 12, 2013 1:37 pm    Post subject: Reply with quote

Hmm, I am considering to set up a local mirror, but I do not want to run an additional daemon on my mini-box. Theres already sshd on it and all is set up.
How do I use rsync over ssh without setting up rsyncd? If I use the rsync program to access my mini-box, then it already copies things over using ssh. What to do to make emerge use this mechanism?
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 714
Location: Oslo, Norway

PostPosted: Sun Dec 14, 2014 11:50 am    Post subject: Reply with quote

This is 10 years old. Is it still valid? Or are there easier ways obtain a local sync cache today?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Dec 14, 2014 10:39 pm    Post subject: Reply with quote

There are a bunch of other options, like:
  • Share $PORTDIR over NFS, though this doesn't address the fact your initial rsync from upstream is still dangerously insecure.
  • Use webrsync and a caching HTTP proxy (which would also work for distfiles downloads).
  • Use one of the many git mirrors of the portage tree (or switch to Funtoo), and run a local git-daemon

"Easier" is always going to be subjective though.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Dec 15, 2014 5:21 pm    Post subject: Reply with quote

distfiles is best done over sftp, ime; I don't recall the details but I used to have that setup for my old laptop, with the user allowed write access in order to save off new downloads.

Then rsync over ssh, separately, for portage tree.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6
Page 6 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum