{"id":24535204,"url":"https://github.com/aliwoto/restorerrobot","last_synced_at":"2025-06-13T01:31:54.132Z","repository":{"id":272105134,"uuid":"751587494","full_name":"ALiwoto/RestorerRobot","owner":"ALiwoto","description":"An entirely free and automated bot for taking backup from certain databases in an interval.","archived":false,"fork":false,"pushed_at":"2025-03-08T19:02:37.000Z","size":15294,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T23:10:06.107Z","etag":null,"topics":["automation","backup","golang","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ALiwoto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-02-01T22:42:04.000Z","updated_at":"2025-03-28T00:04:59.000Z","dependencies_parsed_at":"2025-01-12T07:13:24.893Z","dependency_job_id":"369f0a2e-e018-4a75-ac07-202425edefee","html_url":"https://github.com/ALiwoto/RestorerRobot","commit_stats":null,"previous_names":["aliwoto/restorerrobot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ALiwoto/RestorerRobot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALiwoto%2FRestorerRobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALiwoto%2FRestorerRobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALiwoto%2FRestorerRobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALiwoto%2FRestorerRobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ALiwoto","download_url":"https://codeload.github.com/ALiwoto/RestorerRobot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ALiwoto%2FRestorerRobot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259561740,"owners_count":22876875,"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":["automation","backup","golang","postgresql"],"created_at":"2025-01-22T12:16:07.225Z","updated_at":"2025-06-13T01:31:54.103Z","avatar_url":"https://github.com/ALiwoto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003ch1 align=\"middle\"\u003e RestorerRobot \u003c/h1\u003e\n\nA bot written in golang using mtproto for backing up databases and uploading them to telegram logging channels.\nTelegram's max limit for uploading files is 2GB, which means the compressed file (.zip)'s size that bot is trying to upload to telegram should not be more than 2GB.\n\n\u003chr/\u003e\n\n## how to configure the project\nConfiguration file is called `config.ini`, it has a structure such as this (for a more completed sample file, please visit [config.sample.ini](config.sample.ini) file):\n```ini\n[main]\napp_id = 12345\napp_hash = abcd\nbot_token = 1234324:abcd\nbackups_base_directory_path = backups\n\n[SaitamaRobot]\ndb_url = postgresql://Username:Password@localhost:5432/DatabaseName\nbackup_interval = 10\n# additional log channels, backup file will be sent to these channels\nlog_channels = -10012548, -1005487\nbackup_type = dump\n\n[KigyoRobot]\ndb_url = postgresql://Username:Password@localhost:5432/DatabaseName\nbackup_interval = 10\n# additional log channels, backup file will be sent to these channels\nlog_channels = -10012548, -1005487\nbackup_type = dump\n\n[PsychoPass]\ndb_url = postgresql://Username:Password@localhost:5432/DatabaseName\nbackup_interval = 15\n# additional log channels, backup file will be sent to these channels\nlog_channels = -10012548, -1005487\nbackup_type = dump\n\n[AllMightRobot]\ndb_url = postgresql://Username:Password@localhost:5432/DatabaseName\n# backup interval in days\nbackup_interval = 20\n# additional log channels, backup file will be sent to these channels\nlog_channels = -10012548, -1005487\nbackup_type = dump\n# if you set this to true, bot won't send backup files of this config section\n# to the global log channel. they will only be sent to their specified log channel.\nno_global = true\n\n[StalkerGameRobot]\ndb_path = E:\\StalkerGameRobot\\user.db\n# backup interval in days\nbackup_interval = 7\n#log_channels = -10012548, -1005487\nbackup_type = sqlite\n```\n\nConfig file contains `main` sections and other sections, every field in the main section\nis applied to the whole project (they are globally used), but every field in each own section, is only applied to that project.\n\nYou can add as many as project you would like to the config file, there is no limits in that.\nThe field `db_url` is shouldn't necessary be hosted on localhost, as long as it's valid and accessible, it will be okay.\n\n**WARNING**: all parameters inside of db_url **SHOULD** be url-encoded, otherwise backing up operation will result in failure.\n\n\u003chr/\u003e\n\n### Log channels\nThere are two types of log channels: global log channels and separated log channels.\nAll backup files will be sent to global log channels, regardless of when, who and why the bot is taking backup. Those who have access to those log channels will be able to download all of backup files shared by this bot.\n\nSeparated log channels are related to their own project, another projects' backup files will not be shared in those log channels. For example consider bot is trying to get backup from SaitamaRobot's database, the compressed file will be sent to log-channel and SaitamaRobot's separated log-channel (`log_channels` config variable can point to a channel, group or a user).\n\nIn the case a user uses `/forcebackup` command, the compressed file will be sent to log-channels AND the user's PM.\n\n\u003chr/\u003e\n\n### Scheduled backups\n\nThere will be a time interval between backing up each project. For example you can set backup time-interval of `AllMightRobot` project to 20 (days), that way if 20 days passes from last time `AllMightRobot`'s db got backed up, bot will try to take next backup automatically.\nAnd then the compressed backup file will be sent to the log channel.\n\nThis part is still incomplete.\n\n\u003chr/\u003e\n\n### Backup types\nThis bot currently supports 2 types of backup file output:\n- .dump\n- .sql\n\nYou can set `backup_type` variable in `config.ini` file to either of them (please don't include '.').\nDefault backup type is set to `sql`.\n\n\u003chr/\u003e\n\n### Force backup\n\nOwners can forcefully make the bot to backup and upload the compressed file to telegram. Please do notice that the file will be also sent to global log channels, if you don't want this, consider using `--private` flag in your command.\n\nCommand for forceful backup is as following:\n\n`/forcebackup SaitamaRobot`\n\nor you can also pass it direct db url:\n\n`/forcebackup postgresql://Username:Password@localhost:5432/DatabaseName`\n\n\u003chr/\u003e\n\n\n\u003ch2 align=\"middle\"\u003e \n    - By \u003ca href=https://t.me/Kaizoku\u003e Kaizoku \u003c/a\u003e\n\u003c/h2\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliwoto%2Frestorerrobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliwoto%2Frestorerrobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliwoto%2Frestorerrobot/lists"}