WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: User mirroring of the repo.  (Read 12557 times)

Offline beerstein

  • Sr. Member
  • ****
  • Posts: 398
Re: User mirroring of the repo.
« Reply #30 on: February 24, 2011, 04:50:04 AM »
Do I understand that correctly?

We could the personal sub-repo automatically synchronize with the ibiblio repo?

I have another question: If I run that sub-part-repo on my home server (lighttpd) are the
dependencies installed also? Is there extra coding work necessary for that?

thanks
beerstein
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline hiro

  • Hero Member
  • *****
  • Posts: 829
Re: User mirroring of the repo.
« Reply #31 on: February 24, 2011, 05:38:53 AM »
Yeah, I think you understand this correctly. No extra work necessary.
On your normal pc you could use tce-cache instaed of tce-load, so that your cache/mirror will serve that same version to all other clients afterwards.

You could of course just ssh into your mirror and then use tce-load just as usual, but I often look at e.g. .info files, so I'd want to change tce-load to also download them.
« Last Edit: February 24, 2011, 05:43:08 AM by hiro »

Offline khamara

  • Newbie
  • *
  • Posts: 2
Re: User mirroring of the repo.
« Reply #32 on: March 28, 2011, 04:59:57 AM »
it shouldn't be hard to write a perl script for an Apache Web Server. I wrote a caching proxy server in perl a millenia ago, it can be reused here.

The idea:
1) have a directory on the web server containing the tcz files
2) 'offer' what's available from the main TC site
3) if the local server does not have the file, download from the main server, stream to the client and store for future downloads
4)it should also check for updates before offering any files

I am tempted to dig up that old code but I usually just copy files across my thumb drives. Unfortunately usb copies are not reliable for large files especially on windows and I have to do a 'sum' to make sure.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: User mirroring of the repo.
« Reply #33 on: March 28, 2011, 05:27:24 AM »
...
I am tempted to dig up that old code...
Sounds really useful, how about turning it in to an extension for the repository?
 

Offline beerstein

  • Sr. Member
  • ****
  • Posts: 398
Re: User mirroring of the repo.
« Reply #34 on: March 28, 2011, 08:54:38 AM »
Hi: I am glad you came up with this new post.
I am trying to do this for month. Could you please post your script and some more detailed infp?
An extension would be even better.

Thank you
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline DoRight

  • Newbie
  • *
  • Posts: 3
Re: User mirroring of the repo.
« Reply #35 on: May 06, 2011, 07:11:06 PM »
... having a large portion of the official repo available locally. I do an rsync (only tranfser differences) about twice a week in order not to be a too bad citizen.

I would like to rsync the Tiny Core repository to/for my terminal server.  I have very 'iffy' internet access except for between 1 - 4 AM (7 - 10 AM GMT).  I live in rural eastern Honduras where I am responsible for 2 school labs and assist with a 3rd.
I have not been able to figure out the source directory for the rsync.  Please assist.  Here is what I have tried:
Code: newbielink:javascript:void(0); [nonactive]
rsync -av --stats  --progress --delete-after --exclude-from=/srv/tc.exclude --include-from=/srv/tc.include distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/* .Any suggestions for the exclusion file?  Especially what files should not be excluded?  I hope to start doing development on Tiny Core, especially Spanish language updates and some missing educational apps.  I will just rsync needed TCE's for now.  But my user base is growing rapidly in their computational sophistication.
Thanks, Do

Offline mbainrot

  • Newbie
  • *
  • Posts: 4
Re: User mirroring of the repo.
« Reply #36 on: June 08, 2011, 09:29:00 PM »
Would it be possible to have just a gzipped copy of the repository?

Then atleast it would speed things up a little bit (by preventing multiple download threads and hung downloads)

edit:

... having a large portion of the official repo available locally. I do an rsync (only tranfser differences) about twice a week in order not to be a too bad citizen.

I would like to rsync the Tiny Core repository to/for my terminal server.  I have very 'iffy' internet access except for between 1 - 4 AM (7 - 10 AM GMT).  I live in rural eastern Honduras where I am responsible for 2 school labs and assist with a 3rd.
I have not been able to figure out the source directory for the rsync.  Please assist.  Here is what I have tried:
Code: newbielink:javascript:void(0); [nonactive]
rsync -av --stats  --progress --delete-after --exclude-from=/srv/tc.exclude --include-from=/srv/tc.include distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/* .Any suggestions for the exclusion file?  Especially what files should not be excluded?  I hope to start doing development on Tiny Core, especially Spanish language updates and some missing educational apps.  I will just rsync needed TCE's for now.  But my user base is growing rapidly in their computational sophistication.
Thanks, Do

Ideally if I was you to get you started, I would get all of the binaries, thats all of the files in the tcz/ folder, then leave the sources for another day. I attempted a sync earlier today off ftp.vim.org and failed quite badly because I attempted to sync EVERYTHING. Now I am syncing just the contents of the tcz folder (excluding "source" and "src") to get my base copy.
« Last Edit: June 08, 2011, 09:42:58 PM by mbainrot »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: User mirroring of the repo.
« Reply #37 on: June 09, 2011, 02:35:29 PM »
NOPE, using gzip on any of the already highly compressed tcz files (being 'squashFS' possibly using LZMA) is unlikely to provide any significant savings. I've sometimes even noted that if I want to compress a file that was already very well compressed that the size of the "compressed" output is a few bytes larger than the input as it just adds a few bytes of "wrapper" without being able to "squeeze out" any more.

Furthermore I personally would consider it "nuts" to sync more than the latest (i.e. 3.x) TCZ repository. Who needs all the sources and the older repositories (i.e. 1.x and 2.x) now?

Offline mbainrot

  • Newbie
  • *
  • Posts: 4
Re: User mirroring of the repo.
« Reply #38 on: June 09, 2011, 04:46:29 PM »
My main reference was to reduce the CPU load caused by FTP clients handling large numbers of files.

Didn't know sources weren't needed, fairly new here :)

I guess my question is why are the sources put in the tcz dir when everyone knows most people will drag and drop the whole folder across.

I am only doing the contents (excluding sources) and its insane that I have to deal with 20,000+ files, Noting that I am doing my initial sync on my main workstation not on the server.

If I was to some how find some time in my insane study schedule and was to write up improved documentation, am I able to create a log in to the wiki and then just edit it myself or do I pm someone with my docs?

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4248
Re: User mirroring of the repo.
« Reply #39 on: June 09, 2011, 05:04:13 PM »
Hi mbainrot
According to a couple of posts I've read you can log into the wiki using your Tinycore name and
password, and add documentation.


Offline mbainrot

  • Newbie
  • *
  • Posts: 4
Re: User mirroring of the repo.
« Reply #40 on: June 09, 2011, 05:55:32 PM »
Ok awesome, Once I finish my assignments (gotta love end of semester) I might write up some better documentation as it appears that the wiki formatting has munched the docs and its kinda unclear how to do it.

Offline hiro

  • Hero Member
  • *****
  • Posts: 829
Re: User mirroring of the repo.
« Reply #41 on: June 10, 2011, 02:53:28 AM »
Yes, it's insane, why do you need all these extensions anyway?

Offline mbainrot

  • Newbie
  • *
  • Posts: 4
Re: User mirroring of the repo.
« Reply #42 on: June 10, 2011, 06:42:22 PM »
I am setting up a complete local mirror as the other mirrors are really painful to get to from the land of oz.

Also I plan on using tiny core linux for pxe booting and have worked out that a local mirror and a slightly modified initrd (adding some scripts into /opt/bootlocal.sh to make it load stuff) should do the trick WAY better than slax.

Reason I need all packages is because I dont know exactly what my pxe booting setup is actually going to do yet.

In time when money permits I will prolly setup a high speed Australian mirror to make life a little more pleasant for us aussies.

My experience with mirroring is. Basing this on a linux web host
Assuming your www root resides in /var/www create the following directory structure.
/var/www/tc
/var/www/tc/3.x
/var/www/tc/3.x/tcz

use the tree command to verify the structure (noting my present working dir is /var/www)
Code: newbielink:javascript:void(0); [nonactive]
[root@jupiter www]# tree -d tc
tc
`-- 3.x
    `-- tcz

2 directories
[root@jupiter www]#

1) Pick a mirror other than distro.ibbilio.org (i used ftp.vim.org) to get most of your stuff
2) Navigate to your version (e.g. 3.x)
4) Navigate to the tcz folder (note, this could take some time as generating a directory listing is pretty labourious)
5) For a full dump, copy all files inside of the tcz dir but avoid downloading the sources/src directory as they are quite large arn't needed for a local mirror.
6) When completed you'll probabally find that there are files missing, to rectify this connect to the main ftp server and then tell your client to only overwrite existing files if the source is newer. Whilst in theory it causes a load spike its short lived and its enough to get you going.
7) Check your folder permissions and then remaster your tiny core linux build so it uses your local repo.
8) Enjoy :)

Thats pretty much a detailed tl;dr of how to do it in easy to digest form.

Offline Pentium44

  • Newbie
  • *
  • Posts: 13
  • ***The CDDO***
Re: User mirroring of the repo.
« Reply #43 on: February 18, 2014, 09:15:35 AM »
Mind if I make a mirror of distro.ibiblio.org/tinycorelinux at vps.cddo.us/pub/tinycorelinux/ ?
My Micro Core based distribution: http://nutralinux.us.to/
My website: http://www.cddo.us/