{"id":20330344,"url":"https://github.com/sjdiego/znc-files","last_synced_at":"2026-07-01T23:31:35.548Z","repository":{"id":158385613,"uuid":"562225367","full_name":"sjdiego/znc-files","owner":"sjdiego","description":"A very custom deployment to run a ZNC instance and backup its logs into S3 bucket","archived":false,"fork":false,"pushed_at":"2023-01-02T16:24:50.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-25T12:06:33.771Z","etag":null,"topics":["s3","s3-bucket","znc"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjdiego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-05T17:25:59.000Z","updated_at":"2023-04-06T17:28:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"485b8346-9970-48b3-ae9d-50a824187c62","html_url":"https://github.com/sjdiego/znc-files","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sjdiego/znc-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjdiego%2Fznc-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjdiego%2Fznc-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjdiego%2Fznc-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjdiego%2Fznc-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjdiego","download_url":"https://codeload.github.com/sjdiego/znc-files/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjdiego%2Fznc-files/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35027340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["s3","s3-bucket","znc"],"created_at":"2024-11-14T20:15:56.572Z","updated_at":"2026-07-01T23:31:35.531Z","avatar_url":"https://github.com/sjdiego.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZNC config files\n\nRepository of files to have a ZNC instance and backup log files into S3 bucket.\n\n## Requirements\n- Python3\n- Docker\n- OpenSSL (1.1.1)\n- aws-cli\n- AWS account with S3 permissions\n- [Healthchecks.io](https://www.healthchecks.io) account\n\n## How to start ZNC\nJust start it with docker using the following command:\n- `docker-compose up`\n\n## How to backup log files\nBefore using the backup log script you should have aws-cli already configured and authenticated, and a ping endpoint in healthchecks.io\n\nThe backup script performs the following operations:\n- Checks for the required parameters\n- Removes old log files (it should be already backup'd) and empty directories\n- Looks for newest log files and creates a tar.gz file in /tmp\n- Encrypts tar file with password provided in env var\n- Uploads tar.gz file to S3 bucket\n- Confirms operation to Healthchecks.io\n\n## Deployment of S3 bucket using Cloudformation\nExecute the following command:\n- `aws cloudformation deploy --stack-name \u003cyour-desired-stack-name\u003e --template-file stack.yml --capabilities CAPABILITY_IAM`\n\n## Create a cronjob for backup\nRename cronjob.example.sh, modify it with encryption password, chmod +x it and add an entry into your cron file like this:\n- `0 2 * * MON ~/znc/cronjob.sh \u003e\u003e ~/znc/backup.log 2\u003e\u00261`\n\n## How to decrypt backup log file\nExecute the following commands:\n\n```\n$ export ENCRYPTION_PASS=\u003cyour_password\u003e\n\n$ openssl enc -aes-256-cbc \\\n    -md sha512 -iter 100000 \\\n    -pbkdf2 -salt \\\n    -d \\\n    -in \u003cfile.tar.gz.encrypted\u003e \\\n    -out unencrypted.tar.gz \\\n    -pass env:ENCRYPTION_PASS\n\n$ unset ENCRYPTION_PASS\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjdiego%2Fznc-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjdiego%2Fznc-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjdiego%2Fznc-files/lists"}