WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to sync local mirror to repo.tinycorelinux.net?  (Read 111 times)

Offline GNUser

  • Full Member
  • ***
  • Posts: 163
how to sync local mirror to repo.tinycorelinux.net?
« on: November 08, 2019, 05:56:05 AM »
I have a local Pure64 mirror that I periodically update with this command:

Code: [Select]
lftp -c "open http://distro.ibiblio.org/tinycorelinux/10.x/x86_64/tcz/; lcd /path/to/local/tcz; mirror --verbose --continue --delete --no-recursion"

But I've noticed that when juanito posts an extension, it becomes immediately available on http://repo.tinycorelinux.net while it takes a day or two to become available on http://distro.ibiblio.org. Therefore, I'd like to sync my local mirror directly to http://repo.tinycorelinux.net if possible.

This command does not work--lftp sees the remote tcz directory as empty for some reason:

Code: [Select]
lftp -c "open http://repo.tinycorelinux.net/10.x/x86_64/tcz/; lcd /path/to/local/tcz; mirror --verbose --continue --delete --no-recursion"

What's wrong with this command? What command should I use to sync my local mirror to http://repo.tinycorelinux.net?

P.S. The command downloads only the files that are new or have changed, so there is no strain on anyone's bandwidth.
« Last Edit: November 08, 2019, 06:09:45 AM by GNUser »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6886
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #1 on: November 08, 2019, 06:15:48 AM »
Hi GNUser
Use  rsync.  Here's an example for keeping a current list of  ,dep  files in your current directory:
Code: [Select]
rsync -dtivh --delete repo.tinycorelinux.net::tc/10.x/x86/tcz/*.dep .

Offline GNUser

  • Full Member
  • ***
  • Posts: 163
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #2 on: November 08, 2019, 06:32:56 AM »
Hi, Rich. YES! Wow, that's beautiful. This does what I need:
Code: [Select]
rsync -dtivh --delete repo.tinycorelinux.net::tc/10.x/x86/tcz/ /path/to/local/tczGlad I asked. Many thanks!

Offline GNUser

  • Full Member
  • ***
  • Posts: 163
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #3 on: November 08, 2019, 08:05:37 AM »
What does ::tc mean here?

I figure the :: indicates rsync daemon is running remotely, but I'm confused as to what the tc is doing there. Is it a username? Or maybe a module?
(Please pardon my ignorance, but I don't know much about rsync daemon--I'm only familiar with "local" and "remote shell" usage.)
« Last Edit: November 08, 2019, 08:19:27 AM by GNUser »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6886
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #4 on: November 08, 2019, 08:21:16 AM »
Hi GNUser
I don't remember the specifics of the command. I'm pretty sure I wound asking Google for help composing it.

Offline GNUser

  • Full Member
  • ***
  • Posts: 163
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #5 on: November 08, 2019, 08:23:05 AM »
Internet searches are not helping me crack it. Oh, well. I'll dig some more when I can.
If you remember why you put that there, please do tell. Cheers.

Offline GNUser

  • Full Member
  • ***
  • Posts: 163
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #6 on: November 08, 2019, 08:32:58 AM »
If I leave tc out, rsync spits out an error saying "the remote path must start with a module name not a /". I guess the rsync daemon running on repo.tinycorelinux.net has a module named tc.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10046
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #7 on: November 08, 2019, 10:26:54 AM »
Yes, it's just the name we gave for the rsync daemon module.
The only barriers that can stop you are the ones you create yourself.

Offline GNUser

  • Full Member
  • ***
  • Posts: 163
Re: how to sync local mirror to repo.tinycorelinux.net?
« Reply #8 on: November 08, 2019, 10:52:36 AM »
Thank you, curaga. Always better to know than to suppose :)