{"id":22455576,"url":"https://github.com/micheledurante/backup-scripts","last_synced_at":"2025-03-27T13:18:20.125Z","repository":{"id":142122098,"uuid":"230802635","full_name":"micheledurante/backup-scripts","owner":"micheledurante","description":"A collection of scripts and other miscellaneous related to the Pluto box. ","archived":false,"fork":false,"pushed_at":"2023-07-04T20:38:53.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T17:43:43.960Z","etag":null,"topics":["pluto","scripts"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micheledurante.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2019-12-29T20:58:23.000Z","updated_at":"2023-07-08T07:48:01.000Z","dependencies_parsed_at":"2023-07-18T18:23:19.550Z","dependency_job_id":null,"html_url":"https://github.com/micheledurante/backup-scripts","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheledurante%2Fbackup-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheledurante%2Fbackup-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheledurante%2Fbackup-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheledurante%2Fbackup-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micheledurante","download_url":"https://codeload.github.com/micheledurante/backup-scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245850358,"owners_count":20682647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["pluto","scripts"],"created_at":"2024-12-06T07:12:15.612Z","updated_at":"2025-03-27T13:18:20.120Z","avatar_url":"https://github.com/micheledurante.png","language":"Rust","readme":"# Backup Scripts\nA collection of scripts and other misc items related to `computerobandolero` server.\n\n## How to Build\nIn each `rust/` subdir, run:\n```shell\ncargo build --release\n```\n\n## Deployments\nCron jobs are defined here `/var/spool/cron/crontabs/root` as:\n\n    ```00 01 * * * /usr/src/backup-scripts/scripts/backup-mail.sh \u003e\u003e /var/log/backup-scripts/backup-mail.log 2\u003e\u00261```\n    ```05 01 * * * /usr/src/backup-scripts/rust/dns_checker/target/release/dns_checker \u003e\u003e /var/log/backup-scripts/dns_checker.log 2\u003e\u00261```\n    ```30 01 * * * /usr/src/backup-scripts/scripts/backup-web-logs.sh \u003e\u003e /var/log/backup-scripts/backup-web-logs.log 2\u003e\u00261```\n    ```00 00 1 * * /usr/src/backup-scripts/scripts/update-geo-ip.sh \u003e\u003e /var/log/backup-scripts/update-geo-ip.log 2\u003e\u00261```\n\nRequired env variables. MUST be defined in `/etc/environment` for cron to work correctly:\n1. `TELEGRAM_MICHELED_EMERGENCIES_API_KEY`\n1. `TELEGRAM_MICHELED_EMERGENCIES_CHAT_ID`\n1. `TELEGRAM_MICHELED_ALIVE_MESSAGES_API_KEY`\n1. `TELEGRAM_MICHELED_ALIVE_MESSAGES_CHAT_ID`\n1. `TELEGRAM_MICHELED_BDAYS_API_KEY`\n1. `TELEGRAM_MICHELED_BDAYS_CHAT_ID`\n\nIn addition, program-specific vars are:\n\n- dns_checker\n    1. `DNS_CHECKER_DOMAINS` a comma-separated list of domains to check DNS for.\n    \n- bdays_reminder\n    1. `BDAY_REMINDER_PEOPLE` a comma-separated list of people and Birthdays dates like: `marco#1986-11-30`.\n    \n- backup-mail\n    1. `BACKUP_MAIL_DESTINATION_PORT`\n    1. `BACKUP_MAIL_IDENTITY_LOCATION`\n    1. `BACKUP_MAIL_DESTINATION_IP`\n    \n- backup-web-logs\n    1. `BACKUP_WEB_LOGS_DESTINATION_PORT`\n    1. `BACKUP_WEB_LOGS_IDENTITY_LOCATION`\n    1. `BACKUP_WEB_LOGS_DESTINATION_IP`\n\n## Alert Chats\nAll messages must be in the form of\n`{HOST_NAME}::{PROGRAM_NAME}[::{MESSAGE_TYPE}] \"message\"`\n1. `{HOST_NAME}` = Human-readable name of the machine running the program.\n1. `{PROGRAM_NAME}` = Name of the program. Must follow the program name conventions.\n1. `{MESSAGE_TYPE}` = Optional. Applies to programs that send more than 1 type of message.\n1. `\"message\"` = The message. Must be enclosed in double quotes.\n\n### Emergencies\n- chat: micheled_emergencies\n- bot: micheled_emergencies_bot\n- `TELEGRAM_MICHELED_EMERGENCIES_API_KEY`\n- `TELEGRAM_MICHELED_EMERGENCIES_CHAT_ID`\n- format: `HOSTNAME::DNS_CHECKER::EMERGENCY \"message\"`\n\nE.g:\n```\nwin10::DNS_CHECKER::EMERGENCY \"NoRecordsFound { query: Query { name: Name { is_fqdn: false, labels: [micheledurante] },\n query_type: AAAA, query_class: IN }, valid_until: None }\"\n```\n\n### Alive Messages\n- chat: micheled_alive_messages\n- bot: micheled_alive_messages_bot\n- `TELEGRAM_MICHELED_ALIVE_MESSAGES_API_KEY`\n- `TELEGRAM_MICHELED_ALIVE_MESSAGES_CHAT_ID`\n- format: `HOSTNAME::DNS_CHECKER::ALIVE_MESSAGE \"message\"`\n\nE.g.:\n```\nwin10::DNS_CHECKER::ALIVE_MESSAGE \"Ok\"\n```\n\n### Bdays\n- chat: micheled_bdays\n- bot: micheled_bdays_bot\n- `TELEGRAM_MICHELED_BDAYS_API_KEY`\n- `TELEGRAM_MICHELED_BDAYS_CHAT_ID`\n- format: `HOSTNAME::BDAYS \"message\"`\n\nE.g.:\n```\nwin10::BDAYS \"Bday for Marco tomorrow\"\nwin10::BDAYS \"Bday for Marco today!\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicheledurante%2Fbackup-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicheledurante%2Fbackup-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicheledurante%2Fbackup-scripts/lists"}