{"id":17674548,"url":"https://github.com/007revad/synology_config_backup","last_synced_at":"2025-08-22T06:11:08.417Z","repository":{"id":65819035,"uuid":"568620755","full_name":"007revad/Synology_Config_Backup","owner":"007revad","description":"Backup and export your Synology DSM configuration.","archived":false,"fork":false,"pushed_at":"2025-03-22T20:07:12.000Z","size":235,"stargazers_count":41,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-28T17:18:37.012Z","etag":null,"topics":["backup","diskstation","dsm","rackstation","synology","synology-disk-station","synology-dsm","synology-nas"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/007revad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"007revad","custom":["https://www.paypal.me/007revad"]}},"created_at":"2022-11-21T03:27:59.000Z","updated_at":"2025-04-22T20:43:15.000Z","dependencies_parsed_at":"2023-12-10T09:27:18.120Z","dependency_job_id":"fd0996a5-d5da-4c91-be3e-1495f01e856f","html_url":"https://github.com/007revad/Synology_Config_Backup","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/007revad%2FSynology_Config_Backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/007revad%2FSynology_Config_Backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/007revad%2FSynology_Config_Backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/007revad%2FSynology_Config_Backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/007revad","download_url":"https://codeload.github.com/007revad/Synology_Config_Backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251352638,"owners_count":21575865,"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","diskstation","dsm","rackstation","synology","synology-disk-station","synology-dsm","synology-nas"],"created_at":"2024-10-24T07:07:31.707Z","updated_at":"2025-04-28T17:18:43.061Z","avatar_url":"https://github.com/007revad.png","language":"Shell","funding_links":["https://github.com/sponsors/007revad","https://www.paypal.me/007revad","https://www.paypal.com/paypalme/007revad"],"categories":[],"sub_categories":[],"readme":"# Synology Config Backup\n Backup and export your Synology DSM configuration.\n\n\u003ca href=\"https://github.com/007revad/Synology_Config_Backup/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/007revad/Synology_Config_Backup.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://hits.seeyoufarm.com\"\u003e\u003cimg src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2F007revad%2FSynology_Config_Backup\u0026count_bg=%2379C83D\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=views\u0026edge_flat=false\"/\u003e\u003c/a\u003e\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/007revad)\n[![](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86)](https://github.com/sponsors/007revad)\n[![committers.top badge](https://user-badge.committers.top/australia/007revad.svg)](https://user-badge.committers.top/australia/007revad)\n\n### Description\n\nThis is a bash script to backup a Synology's System Config, and optionally copy it via SCP to another server.\n\nWorks on DSM 7 and DSM 6\n\n#### What the script does:\n\n* Gets your Synology's hostname and the date for use in the backup filename.\n  * The Synology's hostname is included in the backup's filename in case you have multiple Synology's.\n* Checks that the script is running as root.\n* Checks that your specified backup location exists.\n* Exports the system config to your specified folder.\n* If REMOTE_BACKUP=yes copies the backup to the specified remote server.\n\n**Example of the backup's auto-generated filename:** DISKSTATION_2022-11-07_0600.dss\n\n\u003c/br\u003e\n\n\u003cp align=\"left\"\u003eViewing the result in \"Task Scheduler \u003e select task \u003e Action \u003e View Result \u003e view details\"\u003c/p\u003e\n\u003cp align=\"left\"\u003e\u003cimg src=\"/images/result.png\"\u003e\u003c/p\u003e\n\n### Settings\n\nYou need to set **TARGET_DIR=** near the top of the script (below the header). Set it to the location where you want the backup saved to. \n\nYou also need to set **REMOTE_BACKUP=** to yes if you want to copy the backup to a remote server.\n\n**For example:**\n\n```YAML\nTARGET_DIR=\"/volume1/Backups/NAS_System_Backups/DiskStation\"\nREMOTE_BACKUP=yes\n```\n\n#### Extra settings for copying the backup to a remote server\n\nIf you set REMOTE_BACKUP=yes you also need to set the REMOTE_PORT, REMOTE_IP, REMOTE_DIR, LOCAL_USER and REMOTE_USER to suit your setup.\n\n**For example:**\n\n```YAML\nREMOTE_PORT=22\nREMOTE_IP=192.168.0.100\nREMOTE_DIR=\"/volume1/Backups/NAS_System_Backups/DiskStation\"\nLOCAL_USER=Bob\nREMOTE_USER=Bob\n```\n\nIf you set REMOTE2_BACKUP=yes you also need to set the REMOTE2_PORT, REMOTE2_IP, REMOTE2_DIR, LOCAL2_USER and REMOTE2_USER to suit your setup.\n\n**For example:**\n\n```YAML\nREMOTE2_PORT=22\nREMOTE2_IP=192.168.0.111\nREMOTE2_DIR=\"/volume1/Backups/NAS_System_Backups/DiskStation\"\nLOCAL2_USER=Bob\nREMOTE2_USER=Ted\n```\n\n### Requirements\n\nIf you want to schedule the script to run unattended, and have the script copy the backup to another server you need to have SSH keys setup so SCP can access the remote server without you entering the user's password.\n\nSee https://github.com/007revad/Synology_SSH_key_setup for steps on setting up SSH key authentication.\n\n**Note:** Due to some of the commands used **this script needs to be run as root, or be scheduled to run as root**.\n\n### Download the script\n\n1. Download the latest version _Source code (zip)_ from https://github.com/007revad/Synology_Config_Backup/releases\n2. Save the download zip file to a folder on the Synology.\n3. Unzip the zip file.\n\n### Scheduling the script in Synology's Task Scheduler\n\nSee \u003ca href=how_to_schedule.md/\u003eHow to schedule a script in Synology Task Scheduler\u003c/a\u003e\n\n### Running the script via SSH\n\n[How to enable SSH and login to DSM via SSH](https://kb.synology.com/en-global/DSM/tutorial/How_to_login_to_DSM_with_root_permission_via_SSH_Telnet)\n\nYou run the script in a shell with sudo -s or as root.\n\n```YAML\nsudo -s /path-to-script/synology_config_backup.sh\n```\n\n**Note:** Replace /path-to-script/ with the actual path to the script on your Synology.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F007revad%2Fsynology_config_backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F007revad%2Fsynology_config_backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F007revad%2Fsynology_config_backup/lists"}