[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using rsync to keep squeeze amd64 image freshened.



In-line :-

On Sat, Dec 18, 2010 at 03:57, J.A. Bezemer
<j.a.bezemer@opensourcepartners.nl> wrote:
<snipped for brevity>

> Rsync is no "weird" tool. You can use it just like cp:
>
>  cp /somepath/filename .
>
>  rsync /somepath/filename .
>
> Just the same. Try it. Don't get alarmed by the multitude of options in the
> examples...
>
> Now the nice thing of rsync is that it can copy from a remote server, that's
> just:
>
>  rsync servername::somepath/filename .
>
> To find out what a server is offering, say ftp.tw.debian.org, use "rsync
> -vn". That's mostly like "ls -al":
>
>  rsync -vn ftp.tw.debian.org::
>
> So it's offering debian-cd. Let's get a quick listing:
>
>  rsync -vn ftp.tw.debian.org::debian-cd
>
> There's no weekly-builds dir there, so this is the wrong entrance.
>
>  rsync -vn ftp.tw.debian.org::pub
>  rsync -vn ftp.tw.debian.org::debian
>
> Well, it seems they're just not offering the weekly-builds via rsync. This
> happens often.
>
> The main host, cdimage.debian.org, does have them available:
>
>  rsync -vn cdimage.debian.org::
>  rsync -vn cdimage.debian.org::debian-cd     -> nope
>  rsync -vn cdimage.debian.org::cdimage       -> aha!
>  rsync -vn cdimage.debian.org::cdimage/weekly-builds/     -> mind the /
>  rsync -vn cdimage.debian.org::cdimage/weekly-builds/amd64/
>  rsync -vn cdimage.debian.org::cdimage/weekly-builds/amd64/iso-dvd/
>
> There it is!
>
> Now you would just do:
>
>  rsync
> cdimage.debian.org::cdimage/weekly-builds/amd64/iso-dvd/debian-testing-amd64-DVD-1.iso
> .
>
> but this is where the options become useful:
>
>  rsync --times --partial --verbose --block-size=8192
> cdimage.debian.org::cdimage/weekly-builds/amd64/iso-dvd/debian-testing-amd64-DVD-1.iso
> .
>
> and personally I like --progress when running interactively.
> Don't use --compress, everything in the DVD image is already compressed.
> And the other options you quote are mostly for full-archive copying, so not
> useful in this case.
>

Hi Anne,
Wow that is some useful info. there. I have to confess I didn't know
about compress isn't needed in my case. Some other genteman off-list
shared a command which I'm using now to download (for the first time).
 This is what I'm using now :-

$ rsync -aHPv --block-size=8192
cdimage.debian.org::cdimage/weekly-builds/amd64/iso-dvd/debian-testing-amd64-DVD-1.iso
.
MOTD: Welcome to the rsync archive at Academic Computer Club, Ume\#345
University.

receiving file list ...
1 file to consider
debian-testing-amd64-DVD-1.iso
   986342247  21%   10.75kB/s   95:42:32  ^C
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at
rsync.c(543) [generator=3.0.7]

> So, continuing from the other thread on debian-user:
>
> Rsync doesn't display an update while it's checking your local file, but
> after that, if you use --progress, it will say how the download is going.
>
> Rsync will download to a temporary filename starting with a dot (.name). It
> will rename the file to the correct name once it's finished and correct.
> _If_ you press Ctrl-C while rsync is downloading, _and_ you used --partial,
> both the original file and the temporary "half-file" are kept (though mind
> the filenames!). To continue: "cat half-download >> originalfile", mind the
> filenames again, and just restart the same rsync command.
>
> Note in case you wondered: rsync will speed up the download by using blocks
> of the file it already has, but this works _only_ if there is a file with
> the exact same name in the directory you're downloading to (i.e. you will
> overwrite that file). If you want to keep the old version of the file you're
> updating, make a copy to a different filename before you start rsync.

Ok, also I don't know about how you used the 'cat command to continue
the download' and it does sound complicated as you are saying so.

This is what I have done. I have made a specific directory for the
download. In my case its /home/shirish/beta2rsync which only has the
file download happening.

What I have been doing is re-running the same command

$ rsync -aHPv --block-size=8192
cdimage.debian.org::cdimage/weekly-builds/amd64/iso-dvd/debian-testing-amd64-DVD-1.iso
.

whenever I want to end the session I use the CTRL+C  and when I want
to start-up again, re-run the same command i.e.

$ rsync -aHPv --block-size=8192
cdimage.debian.org::cdimage/weekly-builds/amd64/iso-dvd/debian-testing-amd64-DVD-1.iso
.

And as you have rightfully said, it sees what's there already and then
downloads the remaining part.

The real fun should start next week when there will be a new release
and I want to see how it would work, should I be running the same
command and expect rsync to intelligently know which files have been
changed and which have remained the same ?

> Hopefully this is enough to get you going.
>
> Best regards,
>
> Anne Bezemer

Thank you for your help, wisdom and kind words.

I wish what you have said could be captured in some tutorial. Most of
the tutorials out there just look at the big picture and not as small
stuff like individuals like me .

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17


Reply to: