FTPSYNC-CRON(1)

πŸ“¦
this version Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸŽ€ FTPSYNC-CRON β€” the cron wrapper bestie ✨

okay so welcome to the ftpsync-cron(1) girlies' corner of the ftpsync Manual πŸ’… this is a section-1 page, she's a command, she's a whole vibe


🌸 NAME 🌸

ftpsync-cron β€” a wrapper around ftpsync for use in cron(8) 🫢


✨ SYNOPSIS ✨

ftpsync-cron [ARCHIVE]

πŸ’– DESCRIPTION πŸ’–

okay bestie, sit down, hydrate, this is actually so cool πŸ’§

ftpsync-cron is part of the ftpsync suite for mirroring Debian and Debian-like repositories of packages. no cap. 🐧

so here's the tea: there are way too many mirrors of Debian to populate them all from the machine that generates the archive (that's β€œftp-master” πŸ‘‘), so mirrors are organized in a tree-shaped hierarchy. 🌳 meaning:

  • every mirror has exactly one upstream that it syncs from ⬆️
  • and each mirror can have any number of downstreams, which in turn sync from it ⬇️⬇️⬇️

it's giving family tree but make it packages 😭 iconic honestly

now, ftpsync-cron is a wrapper around ftpsync itself, and she is designed to be run out of cron at regular, frequent intervals β€” like, hourly. ⏰ main character energy fr fr

when she gets started, here's the whole routine:

  1. she reads the corresponding ftpsync.conf configuration file for the archive in question πŸ“–
  2. she determines this mirror's upstream πŸ”
  3. she fetches the upstream's trace file via HTTP 🌐
  4. she compares it to the version on disk from the last mirror run β€” so she's literally learning whether the upstream mirror has updated 🧠✨
  5. and if it has? she triggers ftpsync. periodt. πŸ”₯

like the way she just checks and then only does the work when it matters? lowkey genius, highkey obsessed. πŸ’œ


πŸ¦‹ EXAMPLE πŸ¦‹

example use in a user crontab πŸ‘‡

SHELL=/bin/bash
31 * * * * sleep $(( RANDOM %% 1800 )) && ./bin/ftpsync-cron

(that lil sleep + $RANDOM combo is the random-jitter moment, iykyk 🌈)


πŸ’… SEE ALSO πŸ’…


πŸ‘‘ AUTHORS πŸ‘‘

Debian mirror team. 🫑 thank you for your service, legends


okay that's the whole page!! πŸŽ€ one last lil sign-off: this gorgeous thing lives in the ftpsync Manual, and you can find her filed under FTPSYNC-CRON(1) β€” go forth and sync, bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from