# Mirror Mirror free and open-source projects you like with minimal effort. Use this project as a service to keep a local or hosted copy of the projects source code or their assets. ## Status This project is in pre-alpha and under active development. Expect rapid and breaking changes. Planned improvements and known bugs are listed on the project's [todo](https://git.server.ky/slackcoder/mirror/tree?h=todo) branch. ## Requirements The following applications are required on your system. - Golang >= 1.22.4 - git - rsync ## Verification Verify the project and its assets using the GPG Key included in the project. ``` gpg --import GPG-KEY git commit verify-commit HEAD ``` To verify the projects vendored dependencies: ``` go mod verify ``` ## Building and Installation ### Slackware You can create a package using the Slackbuild script provided with the project. ``` cd contrib/slackbuild sudo sh *.SlackBuild ``` ### Other Unix-like systems Standard practice is to install under /usr/local/sbin ``` go build ./cmd/... sudo mv mirror /usr/local/sbin sudo chmod +x /usr/local/sbin/mirror ``` You will then need to integrate it into your system's service management to your liking. ## Configuration Configuration is provided via [TOML](https://toml.io) file format. Refer to the following example. Mirror will mirror each project at a random interval between 1 and 24 hours. ``` [global] # The minimum time to wait before mirroring. min_interval = "1h" # The maximum time to wait before mirroring. max_interval = "24h" [[mirrors]] method = "rsync" from = "rsync://mirrors.kernel.org/slackware/slackware64-current" to = "/mirror/slackware/slackware64-current" [[mirrors]] method = "git" from = "https://github.com/ytdl-org/youtube-dl" to = "/srv/git/slackcoder/youtube-dl" description = "Command-line program to download videos from YouTube.com and other video sites" [[mirrors]] method = "github-assets" from = "https://github.com/ytdl-org/youtube-dl" to = "/mirror/youtube-dl" ```