{"id":15002797,"url":"https://github.com/sophior/dockersqlbackup","last_synced_at":"2026-03-14T16:04:27.120Z","repository":{"id":207183097,"uuid":"718618656","full_name":"Sophior/DockerSQLBackup","owner":"Sophior","description":"A script to run on a host and backup your databases by container name","archived":false,"fork":false,"pushed_at":"2023-11-27T15:37:15.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T13:55:23.745Z","etag":null,"topics":["backup-script","bash","containerstation","docker","msql-database","mssqlserver","nas","qnap","sql","sql-server"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Sophior.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-11-14T13:12:10.000Z","updated_at":"2023-11-14T13:34:47.000Z","dependencies_parsed_at":"2023-11-14T14:48:06.064Z","dependency_job_id":null,"html_url":"https://github.com/Sophior/DockerSQLBackup","commit_stats":null,"previous_names":["sophior/dockersqlbackup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sophior%2FDockerSQLBackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sophior%2FDockerSQLBackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sophior%2FDockerSQLBackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sophior%2FDockerSQLBackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sophior","download_url":"https://codeload.github.com/Sophior/DockerSQLBackup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243153472,"owners_count":20244771,"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":["backup-script","bash","containerstation","docker","msql-database","mssqlserver","nas","qnap","sql","sql-server"],"created_at":"2024-09-24T18:52:39.209Z","updated_at":"2025-12-25T16:25:32.464Z","avatar_url":"https://github.com/Sophior.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DockerSQLBackup\n\nA script to run on a host and backup your databases by container name.\n\nIt assumes you have docker containers running with MSSQL on a linux system and you know how to SSH into your system to set it up. \n\nThe purpose is to automate this process and define the container name. Which elevates the need to reconfigure scripts after an image has been recreated and they have new ids.\n\nIt will read the SA-environment variable out of the docker container and use it to access the database.\nThe databases are then iterated and backed up one by one, and copied over to your configured backupPath.\n\nAfter the script has finished, it will iterate the containers again and remove the .bak files in order to keep the container uncluttered.\n\n\n# Configure your script\n\n1) In the start of the script, define the docker names you wish to backup\n\ndevices=( \"SQLPROD\" \"SQLDEV\" )\n\n2) Set the path of where the .bak files have to end up\n\nbackupPath=\"/share/DOCKERMEDIA/DBbackup\"\n\n\n# Install your script\n1) Set permission\n\nchmod +X DockerSQLBackup.sh\n\n2) Set repetition of the task (every sunday)\n \necho \"0 0 * * 0 /share/DOCKERMEDIA/DockerScripts/DockerSQLBackup.sh\" \u003e\u003e /etc/config/crontab\n\n3) Make crontab see the changes\n crontab /etc/config/crontab\n4) restart crontab\n\ncrontab /etc/config/crontab \u0026\u0026 /etc/init.d/crond.sh restart\n\n5) Validate\n\ncrontab -l\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsophior%2Fdockersqlbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsophior%2Fdockersqlbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsophior%2Fdockersqlbackup/lists"}