LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
Search this Thread
Old 02-01-2013, 02:22 PM   #1
snmcdonald
Member
 
Registered: Jul 2011
Location: Canada
Distribution: Debian, Arch
Posts: 55

Rep: Reputation: 0
Newbie: What is "rsync"?


Coming from other distros such as Debian and Arch, I don't really understand the purpose of rsync. In other distros I select one (or a few [such as security updates]) mirror location and syncronize with the mirror location itself.

Why am I required to set a sync as well as a mirror server?

What is the difference between the GENTOO-MIRRORS and SYNC?

Why do other distros not offer an rsync option?

make.conf:

Code:
GENTOO-MIRRORS="http://my.localmirror.org"
SYNC="rsync://rsync.country.gentoo.org/gentoo-portage"

Last edited by snmcdonald; 02-01-2013 at 03:09 PM.
 
Old 02-01-2013, 03:22 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
rsync is not in the slightest bit gentoo specific. You have rsync on EVERY distro out there. They just don't use it the way gentoo does.

rsync here is being used to mirror a location using the rsync transfer method instead of http or ftp. It's just another way to obtain local copies of files, but here it keeps them up to date more effectively as it will compare the two locations explicitly.
 
1 members found this post helpful.
Old 02-01-2013, 04:06 PM   #3
snmcdonald
Member
 
Registered: Jul 2011
Location: Canada
Distribution: Debian, Arch
Posts: 55

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
rsync is not in the slightest bit gentoo specific. You have rsync on EVERY distro out there. They just don't use it the way gentoo does.
You may have it available but it doesnt appear to be default in either Debian nor Arch.

So if rsync acts as a mirror why am I required to supply an http/ftp mirror as well as an rsync mirror?
 
Old 02-01-2013, 04:13 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
As per the documentation - http://www.gentoo.org/doc/en/handboo...?part=1&chap=6 the mirror contains the source code (lots of data) the rsync contains the config scripts (less code)

You wouldn't want to rsync ALL the source packages, that'd suck!
 
Old 02-01-2013, 10:06 PM   #5
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 7,937

Rep: Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495
The rsync command has been included with every distro I've installed, including Debian, but just as a command that you could use or not use as fits your needs.

Its most common use, I think, is to back up stuff, usually to another computer or drive. That's how I use it, at least.

Last edited by frankbell; 02-01-2013 at 10:10 PM. Reason: clarity
 
Old 02-26-2013, 03:29 PM   #6
bloody
Member
 
Registered: Feb 2013
Location: Berlin
Distribution: Gentoo, Debian
Posts: 158

Rep: Reputation: 23
The rsync command is used to make one directory contain exactly the same than another directory, with a minimum of data transfer required, which is especially useful if the "template" (or "source") directory is located on an externel server in the internet.

rsync copies files you don't have, deletes files the other server does no longer have, and also checks if files have changed (using hashes) and updates your files accordingly. It's a fast & convenient method of synchronizing the contents of two given directories. So rsync is used to create a local 1:1 copy of the recent list of available packages to your machine.

The other "mirror" thing is not used together with rsync because you don't want to download all the tenthousands of software packages that are available for possible install. It only specifies a server address where you can download packages from, which is then used whenever you install [a] software package[s].
 
1 members found this post helpful.
Old 02-28-2013, 05:50 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Mmm, it seems your concern is that Gentoo uses rsync instead of curl or wget... well, assume it, your neighbour probably has a different car, a different pet, and a different wife. It's the way life is :P

Being that said, let's clarify some things.

In first place, as said above, rsync has nothing to do with Gentoo. Gentoo uses rsync just like it uses gcc or glibc. Each distro picks whatever suits.

Secondly, there are two separate kinds of data at package manager level: the ebuilds which conform the portage tree on one side; and the source (and a few binary) packages on the other side.

Gentoo uses rsync for portage, which is kind-of the package database. But it also uses a plethora of other tools to fetch the actual packages. Most tarballs are downloaded using wget, but some ebuilds use other tools, even RCSs like svn, git, bazaar, cvs... It just depends on the nature of the package.

Note that in any case, wget can be changed for whatever suits you by setting $FETCHCOMMAND in make.conf. I don't recommend it, though.

Thirdly, you *don't need* to set neither the mirrors nor the rsync server. There are defaults. Maybe the handbook misguided you in that, I don't know. It's been years since I used it.

rsync just happens to be the most efficient way to keep in sync the portage tree using the minimum bandwidth and cutting drastically the sync times. An RCS like git could be used as well, but it would introduce lots of control files in the tree which is, in my opinion, an unnecessary overhead (and in any case would not bring any advantage over rsync).

If you feel that picky about using rsync for some obscure and mysterious reason, then just use whatever tool you prefer to reguarly download a portage snapshot, remove your old portage tree and uncompress the new one in the same location.

Other than that, is there any real problem that you are trying to solve?

Last edited by i92guboj; 02-28-2013 at 05:53 AM. Reason: typos
 
1 members found this post helpful.
Old 02-28-2013, 04:09 PM   #8
snmcdonald
Member
 
Registered: Jul 2011
Location: Canada
Distribution: Debian, Arch
Posts: 55

Original Poster
Rep: Reputation: 0
Thank you for all your posts. I am still confused about the GENTOO_MIRROR variable.

Quote:
A second important setting is the SYNC setting in make.conf. This variable contains the rsync server you want to use when updating your Portage tree (the collection of ebuilds, scripts containing all the information Portage needs to download and install software).
http://www.gentoo.org/doc/en/handboo...ok_part1_chap2

Is SYNC for synchronizing the portage database and GENTOO_MIRROR for downloading the actual packages.

Is this a rough equivalent?

SYNC ~= aptitude update (SYNC would be where the package manager goes to update the package database)
GENTOO_MIRROR ~= aptitude get <software> (GENTOO_MIRROR would be where the package manager goes to get the actual package)

Last edited by snmcdonald; 02-28-2013 at 04:15 PM.
 
Old 03-01-2013, 03:07 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Yes. You can actually just paste the url into a browser and take a look to see what it contains
 
1 members found this post helpful.
Old 03-01-2013, 11:24 AM   #10
snmcdonald
Member
 
Registered: Jul 2011
Location: Canada
Distribution: Debian, Arch
Posts: 55

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by i92guboj View Post
Yes. You can actually just paste the url into a browser and take a look to see what it contains
Interesting. Thank you. At first I thought it was redundant to separate the list from the software, but on second thought its nice to have a finer control.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
Can you change the "title" under your name that says "member" or "newbie&qu Whitehat LQ Suggestions & Feedback 3 11-19-2003 06:32 PM


All times are GMT -5. The time now is 10:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration