├── .github └── FUNDING.yml ├── .gitignore ├── BasicBackup.c ├── CHANGELOG ├── INFO.sh ├── LICENSE ├── Makefile ├── PACKAGE_ICON.PNG ├── PACKAGE_ICON_256.PNG ├── PROS_AND_CONS.md ├── PROS_AND_CONS_en.md ├── README.md ├── README_en.md ├── SPK_Change_Copyright_Date.sh ├── SynoBuildConf ├── build ├── depends └── install ├── WIZARD_UIFILES ├── uninstall_uifile ├── uninstall_uifile_enu └── uninstall_uifile_ger ├── conf ├── privilege └── resource ├── scripts ├── postinst ├── postuninst ├── postupgrade ├── preinst ├── preuninst ├── preupgrade └── start-stop-status └── ui ├── BasicBackup.js ├── config ├── debug.sh ├── help ├── app-permissions.sh ├── ssh-local.sh ├── ssh-remote.sh ├── ssh-rsa.sh └── versioning.sh ├── images ├── banner_24_orange.png ├── icon_120.png ├── icon_128.png ├── icon_16.png ├── icon_24.png ├── icon_256.png ├── icon_32.png ├── icon_48.png ├── icon_64.png ├── icon_72.png └── icon_90.png ├── index.cgi ├── jobedit.sh ├── lang ├── gui │ ├── lang_gui_enu.txt │ └── lang_gui_ger.txt └── rsync │ ├── lang_rsync_enu.txt │ └── lang_rsync_ger.txt ├── main.sh ├── modules ├── parse_language.sh └── parse_url.sh ├── permissions.sh ├── recovery.sh ├── rsync.sh ├── temp └── .gitkeep ├── template ├── bootstrap │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-grid.rtl.css │ │ ├── bootstrap-grid.rtl.css.map │ │ ├── bootstrap-grid.rtl.min.css │ │ ├── bootstrap-grid.rtl.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap-reboot.rtl.css │ │ ├── bootstrap-reboot.rtl.css.map │ │ ├── bootstrap-reboot.rtl.min.css │ │ ├── bootstrap-reboot.rtl.min.css.map │ │ ├── bootstrap-utilities.css │ │ ├── bootstrap-utilities.css.map │ │ ├── bootstrap-utilities.min.css │ │ ├── bootstrap-utilities.min.css.map │ │ ├── bootstrap-utilities.rtl.css │ │ ├── bootstrap-utilities.rtl.css.map │ │ ├── bootstrap-utilities.rtl.min.css │ │ ├── bootstrap-utilities.rtl.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ ├── bootstrap.rtl.css │ │ ├── bootstrap.rtl.css.map │ │ ├── bootstrap.rtl.min.css │ │ └── bootstrap.rtl.min.css.map │ ├── font │ │ ├── bootstrap-icons.css │ │ ├── bootstrap-icons.json │ │ ├── bootstrap-icons.min.css │ │ ├── bootstrap-icons.scss │ │ └── fonts │ │ │ ├── bootstrap-icons.woff │ │ │ └── bootstrap-icons.woff2 │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.esm.js │ │ ├── bootstrap.esm.js.map │ │ ├── bootstrap.esm.min.js │ │ ├── bootstrap.esm.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map ├── css │ └── stylesheet.css ├── html_functions.sh ├── jquery │ └── jquery-3.7.1.min.js └── js │ ├── backup │ ├── checktree.js │ ├── fadetree.js │ ├── no-validate.js │ ├── popup.js │ └── toggle.js │ ├── body-functions.js │ └── head-functions.js ├── texts ├── enu │ └── strings └── ger │ └── strings ├── usersettings └── .gitkeep └── view.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://www.paypal.me/toafez"] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | INFO 2 | -------------------------------------------------------------------------------- /BasicBackup.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2000-2020 Synology Inc. All rights reserved. 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | int main(int argc, char** argv) { 8 | struct sysinfo info; 9 | int ret; 10 | 11 | ret = sysinfo(&info); 12 | if (ret != 0) { 13 | syslog(LOG_SYSLOG, "Failed to get info\n"); 14 | return -1; 15 | } 16 | 17 | syslog(LOG_SYSLOG, "[BasicBackup] %s package ...", argv[1]); 18 | syslog(LOG_SYSLOG, "[BasicBackup] Total Ram: %u\n", (unsigned int)info.totalram); 19 | syslog(LOG_SYSLOG, "[BasicBackup] Free RAM: %u\n", (unsigned int)info.freeram); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /INFO.sh: -------------------------------------------------------------------------------- 1 | source /pkgscripts/include/pkg_util.sh 2 | package="BasicBackup" 3 | displayname="Basic Backup" 4 | displayname_enu="Basic Backup" 5 | displayname_ger="Basic Backup" 6 | version="0.8-500" 7 | firmware="7.0-40000" 8 | os_min_ver="7.0-40000" 9 | support_center="no" 10 | thirdparty="yes" 11 | reloadui="yes" 12 | arch="noarch" 13 | dsmuidir="ui" 14 | ctl_stop="yes" 15 | startable="yes" 16 | silent_install="no" 17 | silent_upgrade="yes" 18 | silent_uninstall="no" 19 | package_icon="PACKAGE_ICON.PNG" 20 | package_icon_256="PACKAGE_ICON_256.PNG" 21 | dsmappname="SYNO.SDS.BasicBackup.Application" 22 | maintainer="Tommes" 23 | description="Basic Backup enables GUI-supported, file-based data backup based on rsync, as well as version backup according to the generation principle using hard links. Possible backup sources and destinations are internal volumes and USB/SATA data carriers connected externally to a DiskStation, as well as rsync-capable remote servers connected via SSH." 24 | description_enu="Basic Backup enables GUI-supported, file-based data backup based on rsync, as well as version backup according to the generation principle using hard links. Possible backup sources and destinations are internal volumes and USB/SATA data carriers connected externally to a DiskStation, as well as rsync-capable remote servers connected via SSH." 25 | description_ger="Basic Backup ermöglicht eine GUI gestützte, dateibasierte Datensicherung auf Grundlage von rsync, sowie ein Versionsbackup nach dem Generationenprinzip unter Verwendung von Hardlinks. Mögliche Datensicherungsquellen sowie Ziele sind neben internen Volumes und extern an eine DiskStation angeschlossene USB/SATA-Datenträger, auch über SSH verbundene, rsync fähige Remote Server." 26 | helpurl="https://www.synology-forum.de/threads/basic-backup.117455/" 27 | [ "$(caller)" != "0 NULL" ] && return 0 28 | pkg_dump_info 29 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2000-2020 Synology Inc. All rights reserved. 2 | 3 | ## You can use CC CFLAGS LD LDFLAGS CXX CXXFLAGS AR RANLIB READELF STRIP after include env.mak 4 | include /env.mak 5 | 6 | EXEC= BasicBackup 7 | OBJS= BasicBackup.o 8 | 9 | all: $(EXEC) 10 | 11 | $(EXEC): $(OBJS) 12 | $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) 13 | 14 | install: $(EXEC) 15 | mkdir -p $(DESTDIR)/usr/local/bin/ 16 | install $< $(DESTDIR)/usr/local/bin/ 17 | 18 | clean: 19 | rm -rf *.o $(EXEC) 20 | -------------------------------------------------------------------------------- /PACKAGE_ICON.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toafez/BasicBackup/fbccd2606585b8aa43fbd5312159c8f9e49c7004/PACKAGE_ICON.PNG -------------------------------------------------------------------------------- /PACKAGE_ICON_256.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toafez/BasicBackup/fbccd2606585b8aa43fbd5312159c8f9e49c7004/PACKAGE_ICON_256.PNG -------------------------------------------------------------------------------- /PROS_AND_CONS.md: -------------------------------------------------------------------------------- 1 | 👈 [Zurück zur README.md](README.md) 2 | 3 | # Vor- und Nachteile von Basic Backup 4 | Auf einem Synology NAS System übernimmt in der Regel Hyper Backup die umfassende Sicherung von freigegebenen Ordnern, Paketen und LUNs. Basic Backup versteht sich daher als alternative - oder auch ergänzende - Backup Software, welche sich jedoch im Funktionsumfang und in der Arbeitsweise mehr oder weniger stark von Hyper Backup unterscheidet. Die wesentlichen Unterschiede und damit verbunden, die Vor- und Nachteile beider Systeme werden in der nachstehenden Tabelle zusammengefasst. 5 | 6 | ## Unterschiede zwischen Basic Backup und Hyper Backup 7 | 8 | | Feature | Basic Backup | Hyper Backup | 9 | | --- | :---: | :---: | 10 | | **Datensicherung** | 11 | | Gesicherte Daten werden unverschlüsselt direkt ins Dateisystem gespeichert | 🟢 | 🟢 | 12 | | Gesicherte Daten werden in Synologys Datensicherungsformat (.hbk) ggf. verschlüsselt gespeichert | 🔴 | 🟢 | 13 | | **Datensicherungsversionen** | 14 | | Sicherungsversionen werden unverschlüsselt direkt ins Dateisystem unter Verwendung von Hardlinks gespeichert | 🟢 | 🔴 | 15 | | Sicherungsversionen werden in Synologys Datensicherungsformat (.hbk) ggf. verschlüsselt gespeichert | 🔴 | 🟢 | 16 | | **Wiederherstellung** | 17 | | Die Wiederherstellung gesicherter Daten wird unterstützt | 🔴 | 🟢 | 18 | | Das Sichern und Wiederherstellen bestimmter Anwendungen (Pakete) wird unterstützt | 🔴 | 🟢 | 19 | | **Nutzung von extern angeschlossenen USB/SATA-Datenträgern** | 20 | | Ein externer Datenträger kann als Datensicherungsziel ausgewählt werden
***Anmerkung:** Wird unter Verwendung von Basic Backup ein externer Datenträger als Datensicherungsziel angegeben, so kann dieser mittels seiner UUID anstatt seines Mountpoints identifiziert werden. Der Mountpoint wird in diesem Falle ggf. intern an das richtige Gerät umgeleitet.* | 🟢 | 🟢 | 21 | | Es lassen sich Datensicherungsquellen von einem externen Datenträger auswählen
***Anmerkung:** Das Sichern von externen Datenträgern kann evtl. fehlerbehaftet sein, da sich der Mountpoint des Gerätes ziwschenzeitlich ändern kann. Eine Anpassung des Mountpoints durch Ermittlung der UUID ist in diesem Fall nicht vorgesehen.* | 🟢 | 🔴 | 22 | | Es kann eine lokale Datensicherung von einem externen Datenträger auf einen weiteren externen Datenträger erfolgen | 🟢 | 🔴 | 23 | | **Nutzung von Remote Servern im LAN oder über das Internet** | 24 | | Lokale Datensicherungsquellen des Synology NAS lassen sich auf einen Remote Server sichern (Push Backup) | 🟢 | 🟢 | 25 | | Remote Datensicherungsquellen lassen sich auf das lokale Synology NAS sichern (Pull Backup) | 🟢 | 🔴 | 26 | | Aufwecken eines Remote Servers vor Beginn der Datensicherung (Wake on LAN) | 🟢 | 🔴 | 27 | | Herunterfahren eines Remote Servers nach Beendigung der Datensicherung (shutdown) | 🟢 | 🔴 | 28 | | Über die File Station angehängte, freigegebene Remote Ordner können als Datensicherungsquelle oder -Ziel ausgewählt werden
***Anmerkung:** Das Sichern von bzw. auf angehängte, freigegebenen Remote Ordner kann evtl. fehlerbehaftet sein, da rsync hier u.U. Probleme bei der Delta-Kodierung bzw. der Differenzspeicherung bekommen kann.*| 🟢 | 🔴 | 29 | | **Sonstiges** | 30 | | Anfertigen eines detaillierten Datensicherungsprotokolls | 🟢 | 🔴 | 31 | | Optische- und/oder Akustische Signalausgabe über die LED’s bzw. den Lautsprecher des Synology NAS | 🟢 | 🔴 | 32 | 33 | -------------------------------------------------------------------------------- /PROS_AND_CONS_en.md: -------------------------------------------------------------------------------- 1 | 👈 [Back to README_en.md](README_en.md) 2 | 3 | # Advantages and disadvantages of Basic Backup 4 | On a Synology NAS system, Hyper Backup usually takes care of the comprehensive backup of shared folders, packages and LUNs. Basic Backup is therefore an alternative - or supplementary - backup software, which differs from Hyper Backup to a greater or lesser extent in its range of functions and mode of operation. The main differences and the associated advantages and disadvantages of both systems are summarised in the table below. 5 | 6 | ## Differences between Basic Backup and Hyper Backup 7 | 8 | | Feature | Basic Backup | Hyper Backup | 9 | | --- | :---: | :---: | 10 | | **Data Backup** | 11 | | Backed-up data is stored unencrypted directly in the file system | 🟢 | 🟢 | 12 | | Backed up data is stored in Synology's backup format (.hbk), encrypted if necessary | 🔴 | 🟢 | 13 | | **Data backup versions** | 14 | | Backup versions are stored unencrypted directly in the file system using hard links | 🟢 | 🔴 | 15 | | Backup versions are stored encrypted in Synology's backup format (.hbk) if necessary | 🔴 | 🟢 | 16 | | **Restore** | 17 | | Restoring backed up data is supported | 🔴 | 🟢 | 18 | | Backing up and restoring certain applications (packages) is supported | 🔴 | 🟢 | 19 | | **Use of externally connected USB/SATA data carriers** | 20 | | An external data carrier can be selected as a backup destination
***Note:** If an external data carrier is specified as a backup destination using Basic Backup, it can be identified by its UUID instead of its mount point. In this case, the mount point is redirected internally to the correct device, if necessary.* | 🟢 | 🟢 | 21 | | Data backup sources from an external data carrier can be selected
***Note:** Backing up from external data carriers may be subject to errors, as the mount point of the device may change in the meantime. In this case, the mount point is not adjusted by determining the UUID.* | 🟢 | 🔴 | 22 | | A local data backup can be made from an external data carrier to another external data carrier. | 🟢 | 🔴 | 23 | | **Use of remote servers on the LAN or via the Internet** | 24 | | Local backup sources of the Synology NAS can be backed up to a remote server (Push Backup) | 🟢 | 🟢 | 25 | | Remote backup sources can be backed up to the local Synology NAS (Pull Backup). | 🟢 | 🔴 | 26 | | Wake up a remote server before starting the backup (Wake on LAN) | 🟢 | 🔴 | 27 | | Shutting down a remote server after the backup has finished (shutdown) | 🟢 | 🔴 | 28 | | Shared remote folders attached via the File Station can be selected as backup source or destination
***Note:** Backing up from or to attached, shared remote folders may be error-prone, as rsync may have problems with delta encoding or differential storage here.*| 🟢 | 🔴 | 29 | | **Other** | 30 | | Creating a detailed data backup protocol | 🟢 | 🔴 | 31 | | Visual and/or acoustic signal output via the LEDs or the loudspeaker of the Synology NAS | 🟢 | 🔴 | 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [English](README_en.md) | Deutsch 2 | 3 | # ![Package icon](/ui/images/icon_24.png) Basic Backup - Paket für Synology NAS (DSM 7) 4 | 5 | ##

***Der Support und die damit verbundene Weiterentwicklung sowie Fehlerbereinigung von „Basic Backup“ wird zum 01.09.2024 eingestellt.***


6 | 7 | Basic Backup ermöglicht eine GUI gestützte, dateibasierte Datensicherung auf Grundlage von rsync, sowie ein Versionsbackup nach dem Generationenprinzip unter Verwendung von Hardlinks. Mögliche Datensicherungsquellen sowie Ziele sind neben internen Volumes und extern an eine Synology NAS angeschlossene USB/SATA-Datenträger, auch über SSH verbundene, rsync fähige Remote Server. 8 | 9 | - _**Das könnte dich auch interessieren:** [Unterschiede zwischen Basic Backup und Hyper Backup](PROS_AND_CONS.md)_ 10 | 11 | # Systemvoraussetzungen 12 | **Basic Backup** wurde speziell für die Verwendung auf **Synology NAS Systemen** entwickelt die das Betriebsystem **DiskStation Mangager 7** verwenden. 13 | 14 | # Installationshinweise 15 | Laden Sie sich die **jeweils aktuellste Version** von Basic Backup aus dem Bereich [Releases](https://github.com/toafez/BasicBackup/releases) herunter. Öffnen Sie anschließend im **DiskStation Manager (DSM)** das **Paket-Zentrum**, wählen oben rechts die Schaltfläche **Manuelle Installation** aus und folgen dem **Assistenten**, um das neue **Paket** bzw. die entsprechende **.spk-Datei** hochzuladen und zu installieren. Dieser Vorgang ist sowohl für eine Erstinstallation als auch für die Durchführung eines Updates identisch. 16 | 17 | **Nach dem Start** von BasicBackup wird die lokal **installierte Version** mit der auf GitHub **verfügbaren Version** verglichen. Steht ein Update zur Verfügung, wird der Benutzer über die App darüber **informiert** und es wird ein entsprechender **Link** zu dem ensprechenden Release eingeblendet. Der Download sowie der anschließende Updatevorgang wurde bereits weiter oben erläutert. 18 | 19 | - ## Rsync-Dienst aktivieren 20 | Aktivieren Sie im Vorfeld bitte den **rsync-Dienst**. Zum aktivieren des rsync Dienstes gehen Sie zu **DSM-Hauptmenü** > **Systemsteuerung** > **Dateidienste** und wechseln dort in den Reiter > **rsync**. Aktiveren Sie die Checkbox **rsync Dienst aktivieren**. Als **SSH-Verschlüsselungsport** wird standardmäßig der **Port 22** verwendet, welchen Sie bei Bedarf anpassen können. 21 | 22 | - ## SSH Terminal-Dienst aktivieren (falls benötigt) 23 | Aktivieren Sie im Vorfeld bitte auf Ihrer lokalen Synology NAS als auch auf der Remote Synology NAS den **SSH Terminal-Dienst**. Zum aktivieren des SSH Terminal-Dienstes gehen Sie zu **DSM-Hauptmenü** > **Systemsteuerung** > **Terminal & SNMP** und wechseln dort in den Reiter > **Terminal**. Aktiveren Sie die Checkbox **SSH-Dienst aktivieren**. Sollte es sich bei dem verwendeten **Remote Server** um ein anderes Gerät als eine Synology NAS handeln, stellen Sie bitte im Vorfeld sicher, das der **SSH-Dienst** aktiviert wurde. 24 | 25 | - ## Benutzer-Home-Dienst aktivieren (falls SSH-Dienst aktiviert wurde) 26 | Aktivieren Sie im Vorfeld bitte außerdem den **Benutzer-Home-Dienst**, da die benötigten SSH-Verbindungsdaten im entsprechenden Benutzer-Home-Ordner des angemeldeten SSH-Benutzers abgelegt werden. Zum aktivieren des Benutzer-Home-Dienstes gehen Sie zu **DSM-Hauptmenü** > **Systemsteuerung** > **Benutzer und Gruppe** und wechseln dort in den Reiter > **Erweitert**. Aktiveren Sie unter dem Menüpunkt **Benutzerbasis** die Checkbox **Benutzer-Home-Dienst aktiveren**. Sollte es sich bei dem verwendeten **Remote Server** um ein anderes Gerät als eine Synology NAS handeln, stellen Sie bitte im Vorfeld sicher, das ein entsprechender Benutzer-Home-Dienst aktivert wurde. 27 | 28 | - ## App-Berechtigung erweitern 29 | Unter DSM 7 wird eine 3rd_Party Anwendung wie Basic Backup (im folgenden App genannt) mit stark eingeschränkten Benutzer- und Gruppenrechten ausgestattet. Dies hat u.a. zur Folge, das systemnahe Befehle nicht ausgeführt werden können. Für den reibungslosen Betrieb von Basic Backup werden jedoch erweiterte Systemrechte benötigt um z.B. auf die Ordnerstuktur der "freigegebenen Ordner" zugreifen zu können. Zum erweitern der App-Berechtigungen muss Basic Backup in die Gruppe der Administratoren aufgenommen werden, was jedoch nur durch den Benutzer selbst durchgeführt werden kann. Die nachfolgende Anleitung beschreibt diesen Vorgang. 30 | 31 | - #### Erweitern bzw. beschränken der App-Berechtigungen über die Konsole 32 | 33 | - Melden Sie sich als Benutzer **root** auf der Konsole Ihrer Synology NAS an. 34 | - Befehl zum erweitern der App-Berechtigungen 35 | 36 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "adduser"` 37 | 38 | - Befehl zum beschränken der App-Berechtigungen 39 | 40 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "deluser"` 41 | 42 | - #### Erweitern bzw. beschränken der App-Berechtigungen über den Aufgabenplaner 43 | 44 | - Im **DSM** unter **Hauptmenü** > **Systemsteuerung** den **Aufgabenplaner** öffnen. 45 | - Im **Aufgabenplaner** über die Schaltfläche **Erstellen** > **Geplante Aufgabe** > **Benutzerdefiniertes Script** auswählen. 46 | - In dem nun geöffneten Pop-up-Fenster im Reiter **Allgemein** > **Allgemeine Einstellungen** der Aufgabe einen Namen geben und als Benutzer: **root** auswählen. Außerdem den Haken bei Aktiviert entfernen. 47 | - Im Reiter **Aufgabeneinstellungen** > **Befehl ausführen** > **Benutzerdefiniertes Script** nachfolgenden Befehl in das Textfeld einfügen... 48 | - Befehl zum erweitern der App-Berechtigungen 49 | 50 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "adduser"` 51 | 52 | - Befehl zum beschränken der App-Berechtigungen 53 | 54 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "deluser"` 55 | 56 | - Eingaben mit **OK** speichern und die anschließende Warnmeldung ebenfalls mit **OK** bestätigen. 57 | - Die grade erstellte Aufgabe in der Übersicht des Aufgabenplaners markieren, jedoch **nicht** aktivieren (die Zeile sollte nach dem markieren blau hinterlegt sein). 58 | - Führen Sie die Aufgabe durch Betätigen Sie Schaltfläche **Ausführen** einmalig aus. 59 | 60 | - ## Begrenzung der Datenübertragungsrate 61 | Bei der Synchronisierung großer Datenmengen kann, bedingt durch die ausgelöste hohe Lese- und Schreiblast des rsync-Prozesses, die Verfügbarkeit deines Synology NAS sowie an diesem Prozess beteiligte Remote-Server für die Dauer des Auftrags stark einschränkt sein. Dieses Verhalten kann durch die Reduzierung der Bandbreite und unter Berücksichtigung der Lese- und Schreibgeschwindigkeit der verwendeten Datenträger spürbar verbessert werden. Aus diesem Grund besteht innerhalb Basic Backup die Möglichkeit, eine Begrenzung der Datenübertragungsrate als frei einstellbaren Wert zwischen 1 kB/s und maximal 1250000 kB/s zu definieren. 62 | 63 | Wenn das 3rd-Party-Paket [SynoCli Monitor Tools](https://synocommunity.com/package/synocli-monitor) der [SynoCommunity](https://synocommunity.com/) installiert ist, verwendet Basic Backup automatisch das darin enthaltene Programm [ionice](https://linux.die.net/man/1/ionice). ionice kann die hohe Lese- und Schreiblast, die normalerweise durch den rsync-Prozess ausgelöst wird, soweit optimieren, dass die Verfügbarkeit deines Synology NAS und der an diesem Prozess beteiligten Remote-Server jederzeit gewährleistet ist. 64 | 65 | # Versionsgeschichte 66 | - Details zur Versionsgeschichte finden Sie in der Datei [CHANGELOG](CHANGELOG). 67 | 68 | # Entwickler-Information 69 | - Details zum Backend entnehmen Sie bitte dem [Synology DSM 7.0 Developer Guide](https://help.synology.com/developer-guide/) 70 | - Details zum Frontend entnehmen Sie bitte dem [Bootstrap Framework](https://getbootstrap.com/) 71 | - Details zu jQuery entnehmen Sie bitte der [jQuery API](https://api.jquery.com/) 72 | 73 | # Hilfe und Diskussion 74 | - Hilfe und Diskussion gerne über [Das deutsche Synology Support Forum](https://www.synology-forum.de/threads/basic-backup.117455/) oder über [heimnetz.de](https://forum.heimnetz.de/threads/basic-backup-3rdparty-app-fuer-synology-nas-dsm-7.485/) 75 | 76 | # Lizenz 77 | Dieses Programm ist freie Software. Sie können es unter den Bedingungen der **GNU General Public License**, wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß **Version 3** der Lizenz oder (nach Ihrer Option) jeder späteren Version. 78 | 79 | Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, daß es Ihnen von Nutzen sein wird, aber **OHNE IRGENDEINE GARANTIE**, sogar **ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK**. Details finden Sie in der Datei [GNU General Public License](LICENSE). 80 | -------------------------------------------------------------------------------- /README_en.md: -------------------------------------------------------------------------------- 1 | English | [Deutsch](README.md) 2 | 3 | # ![Package icon](/ui/images/icon_24.png) Basic Backup - Package for Synology NAS (DSM 7) 4 | 5 | ##

***Support and the associated further development and bug fixing of “Basic Backup” will be discontinued on 01.09.2024.***


6 | 7 | Basic Backup enables GUI-supported, file-based data backup based on rsync, as well as version backup according to the generation principle using hard links. Possible backup sources and destinations are internal volumes and USB/SATA data carriers connected externally to a Synology NAS, as well as rsync-capable remote servers connected via SSH. 8 | 9 | - _**This might also interest you:** [Differences between Basic Backup and Hyper Backup](PROS_AND_CONS_en.md)_ 10 | 11 | # System requirements 12 | **Basic Backup** is specifically designed for use on **Synology NAS systems** that use the **DiskStation Mangager 7** operating system. 13 | 14 | # Installation instructions 15 | Download the **most recent version** of Basic Backup from the [Releases](https://github.com/toafez/BasicBackup/releases) section. Then open the **Package Centre** in the **DiskStation Manager (DSM)**, select the **Manual Installation** button at the top right and follow the **Wizard** to upload and install the new **Package** or the corresponding **.spk file**. This process is identical for both an initial installation and for performing an update. 16 | 17 | **After starting** BasicBackup, the locally **installed version** is compared with the version **available** on GitHub. If an update is available, the user is **informed** about it via the app and a corresponding **link** to the corresponding release is displayed. The download and the subsequent update process have already been explained above. 18 | 19 | - ## Activate Rsync service 20 | Please activate the **rsync service** in advance. To activate the rsync service, go to **DSM Main Menu** > **Control Panel** > **File Services** and switch to the tab > **rsync**. Activate the checkbox **Enable rsync service**. By default, **port 22** is used as the **SSH encryption port**, which you can adjust if necessary. 21 | 22 | - ## Activate SSH Terminal Service (if required) 23 | Please activate the **SSH Terminal Service** on your local Synology NAS as well as on the remote Synology NAS in advance. To activate the SSH terminal service, go to **DSM main menu** > **Control Panel** > **Terminal & SNMP** and switch to the tab > **Terminal**. Activate the checkbox **Enable SNMP service**. If the **Remote Server** you are using is a device other than a Synology NAS, please make sure that the **SSH Service** is enabled beforehand. 24 | 25 | - ## Enable User Home Service (if SSH service is enabled) 26 | Please also activate the **User Home Service** in advance, as the required SSH connection data is stored in the corresponding User Home folder of the logged-in SSH user. To activate the user home service, go to **DSM main menu** > **Control Panel** > **Users and Group** and switch to the tab > **Advanced**. Under the menu item **User Base**, activate the checkbox **Enable User Home Service**. If the **Remote Server** used is a device other than a Synology NAS, please make sure that a corresponding User Home Service has been activated in advance. 27 | 28 | - ## Extend App Permission 29 | Under DSM 7, a 3rd_Party application such as Basic Backup (referred to as App in the following) is provided with highly restricted user and group rights. Among other things, this means that system-related commands cannot be executed. For the smooth operation of Basic Backup, however, extended system rights are required, e.g. to be able to access the folder structure of the "shared folders". To extend the app permissions, Basic Backup must be added to the administrators' group, but this can only be done by the user himself. The following instructions describe this process. 30 | 31 | - #### Extending or restricting app permissions via the console 32 | 33 | - Log in to the console of your Synology NAS as user **root**. 34 | - Command to extend app permissions 35 | 36 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "adduser"` 37 | 38 | - Command to restrict app permissions 39 | 40 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "deluser"` 41 | 42 | - #### Extend or restrict app permissions via the task planner 43 | 44 | - Open the **Task Scheduler** in **DSM** under **Main Menu** > **Control Panel**. 45 | - In the **Task Scheduler**, select **Create** > **Scheduled Task** > **Custom Script** via the button. 46 | - In the pop-up window that now opens in the **General** > **General Settings** tab, give the task a name and select **root** as the user: **root** as the user. Also remove the tick from Activated. 47 | - In the **Task Settings** tab > **Execute Command** > **Custom Script**, insert the following command into the text field... 48 | - Command to extend the app permissions 49 | 50 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "adduser"` 51 | 52 | - Command to restrict app permissions 53 | 54 | `/usr/syno/synoman/webman/3rdparty/BasicBackup/permissions.sh "deluser"` 55 | 56 | - Save the entries with **OK** and confirm the subsequent warning message with **OK**. 57 | - Mark the task you have just created in the overview of the task planner, but **do not** activate it (the line should be highlighted in blue after marking). 58 | - Execute the task once by pressing the **Execute** button. 59 | 60 | - ## Limitation of the data transfer rate 61 | When synchronizing large amounts of data, the availability of your Synology NAS and remote servers involved in this process may be severely limited for the duration of the job due to the high read and write load triggered by the rsync process. This behavior can be noticeably improved by reducing the bandwidth and taking into account the read and write speed of the data carriers used. For this reason, it is possible within Basic Backup to define a limitation of the data transfer rate as a freely adjustable value between 1 kB/s and a maximum of 1250000 kB/s. 62 | 63 | If the 3rd party package [SynoCli Monitor Tools](https://synocommunity.com/package/synocli-monitor) of the [SynoCommunity](https://synocommunity.com/) is installed, Basic Backup automatically uses the [ionice](https://linux.die.net/man/1/ionice) program contained therein. ionice can optimize the high read and write load that is normally triggered by the rsync process to such an extent that the availability of your Synology NAS and the remote servers involved in this process is guaranteed at all times. 64 | 65 | # Version history 66 | - Details of the version history can be found in the file [CHANGELOG](CHANGELOG). 67 | 68 | # Developer information 69 | - For backend details, please refer to the [Synology DSM 7.0 Developer Guide](https://help.synology.com/developer-guide/). 70 | - For details on the frontend, please refer to the [Bootstrap Framework](https://getbootstrap.com/) 71 | - For details on jQuery, please refer to the [jQuery API](https://api.jquery.com/) 72 | 73 | # Help and discussion 74 | - For help and discussion, please refer to [The German Synology Support Forum](https://www.synology-forum.de/threads/basic-backup.117455/) or [heimnetz.de](https://forum.heimnetz.de/threads/basic-backup-3rdparty-app-fuer-synology-nas-dsm-7.485/) 75 | 76 | # License 77 | This program is free software. You can redistribute it and/or modify it under the terms of the **GNU General Public License** as published by the Free Software Foundation; either **version 3** of the License, or (at your option) any later version. 78 | 79 | This program is distributed in the hope that it will be useful to you, but ** WITHOUT ANY WARRANTY**, even **without the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE**. For details, see the [GNU General Public License](LICENSE) file. 80 | -------------------------------------------------------------------------------- /SPK_Change_Copyright_Date.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Filename: SPK_Build_Stage.sh - coded in utf-8 3 | 4 | # Basic Backup for DSM 7 5 | # 6 | # Copyright (C) 2024 by Tommes | License GNU GPLv3 7 | # Member from the German Synology Community Forum 8 | # 9 | # Extract from GPL3 https://www.gnu.org/licenses/gpl-3.0.html 10 | # ... 11 | # This program is free software: you can redistribute it and/or 12 | # modify it under the terms of the GNU General Public License as 13 | # published by the Free Software Foundation, either version 3 of 14 | # the License, or (at your option) any later version. 15 | # 16 | # This program is distributed in the hope that it will be useful 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | # 20 | # See the GNU General Public License for more details.You should 21 | # have received a copy of the GNU General Public License along 22 | # with this program. If not, see http://www.gnu.org/licenses/ ! 23 | 24 | 25 | # ------------------------------------------------------------------------------------------------- 26 | # Please make your desired changes here 27 | # ------------------------------------------------------------------------------------------------- 28 | 29 | # Changing the copyright 30 | copyright="Copyright (C) 2024 by" 31 | 32 | # ------------------------------------------------------------------------------------------------- 33 | # Please do not make any changes below, unless you know what you are doing! 34 | # ------------------------------------------------------------------------------------------------- 35 | old_copyright="Copyright (C) 2024 by" 36 | path=$(pwd) 37 | 38 | # Costumize Copyright 39 | # ----------------------------------------------- 40 | if [[ "${copyright}" != "${old_copyright}" ]]; then 41 | find . -type f -print0 | xargs -0 -n 1 sed -i -e 's/'"${old_copyright}"'/'"${copyright}"'/g' 42 | echo 'Copyright was changed from [ '${old_copyright}' ] to [ '${copyright}' ]' 43 | else 44 | echo 'Copyright [ '${copyright}' ] was not changed' 45 | fi 46 | 47 | 48 | -------------------------------------------------------------------------------- /SynoBuildConf/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (C) 2000-2020 Synology Inc. All rights reserved. 3 | 4 | case ${MakeClean} in 5 | [Yy][Ee][Ss]) 6 | make clean 7 | ;; 8 | esac 9 | 10 | # You can use CC CFLAGS LD LDFLAGS CXX CXXFLAGS AR RANLIB READELF STRIP here 11 | echo "${CC} ${CFLAGS} BasicBackup.c -o BasicBackup.dummy" 12 | ${CC} ${CFLAGS} BasicBackup.c -o BasicBackup.dummy 13 | 14 | # Or you can use Makefile to genarate executable. 15 | echo "make ${MAKE_FLAGS}" 16 | make ${MAKE_FLAGS} 17 | -------------------------------------------------------------------------------- /SynoBuildConf/depends: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2000-2020 Synology Inc. All rights reserved. 2 | 3 | [default] 4 | all="7.0" 5 | -------------------------------------------------------------------------------- /SynoBuildConf/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (C) 2000-2020 Synology Inc. All rights reserved. 3 | 4 | ### Use PKG_DIR as working directory. 5 | PKG_DIR=/tmp/_BasicBackup_spk 6 | rm -rf $PKG_DIR 7 | mkdir -p $PKG_DIR 8 | 9 | ### get spk packing functions 10 | source /pkgscripts/include/pkg_util.sh 11 | 12 | create_package_tgz() { 13 | local firewere_version= 14 | local package_tgz_dir=/tmp/_package_tgz 15 | local binary_dir=$package_tgz_dir/usr/local/bin 16 | 17 | ### clear destination directory 18 | rm -rf $package_tgz_dir && mkdir -p $package_tgz_dir 19 | 20 | ### install needed file into PKG_DIR 21 | mkdir -p $binary_dir 22 | cp -av BasicBackup $binary_dir 23 | cp -av ui $package_tgz_dir 24 | make install DESTDIR="$package_tgz_dir" 25 | 26 | ### create package.tgz $1: source_dir $2: dest_dir 27 | pkg_make_package $package_tgz_dir "${PKG_DIR}" 28 | } 29 | 30 | create_spk(){ 31 | 32 | cp -av scripts $PKG_DIR/scripts 33 | cp -av PACKAGE_ICON*.PNG $PKG_DIR 34 | cp -av WIZARD_UIFILES $PKG_DIR 35 | cp -av conf $PKG_DIR 36 | cp -av ui $PKG_DIR 37 | cp -av LICENSE $PKG_DIR 38 | 39 | ./INFO.sh > INFO 40 | cp INFO $PKG_DIR/INFO 41 | 42 | ### Create the final spk. 43 | # pkg_make_spk 44 | # Please put the result spk into /image/packages 45 | # spk name functions: pkg_get_spk_name pkg_get_spk_unified_name pkg_get_spk_family_name 46 | mkdir -p /image/packages 47 | pkg_make_spk ${PKG_DIR} "/image/packages" $(pkg_get_spk_family_name) 48 | } 49 | 50 | main() { 51 | create_package_tgz 52 | create_spk 53 | } 54 | 55 | main "$@" 56 | -------------------------------------------------------------------------------- /WIZARD_UIFILES/uninstall_uifile: -------------------------------------------------------------------------------- 1 | [{ 2 | "step_title": "Remove data and settings", 3 | "items": 4 | [{ 5 | "type": "multiselect", 6 | "desc" : "

During the uninstallation of Basic Backup all temporary data and user settings are deleted.

", 7 | "subitems": 8 | [{ 9 | "key": "pkgwizard_remove_settings", 10 | "desc": "Remove all data and settings" 11 | }] 12 | }] 13 | }] 14 | -------------------------------------------------------------------------------- /WIZARD_UIFILES/uninstall_uifile_enu: -------------------------------------------------------------------------------- 1 | [{ 2 | "step_title": "Remove date and settings", 3 | "items": 4 | [{ 5 | "type": "multiselect", 6 | "desc" : "

During the uninstallation of Basic Backup all temporary data and user settings are deleted.

", 7 | "subitems": 8 | [{ 9 | "key": "pkgwizard_remove_settings", 10 | "desc": "Remove all data and settings" 11 | }] 12 | }] 13 | }] 14 | -------------------------------------------------------------------------------- /WIZARD_UIFILES/uninstall_uifile_ger: -------------------------------------------------------------------------------- 1 | [{ 2 | "step_title": "Einstellungen entfernen", 3 | "items": 4 | [{ 5 | "type": "multiselect", 6 | "desc" : "

Während der Deinstallation von Basic Backup werden alle temprären Daten sowie Benutzereinstellungen gelöscht.

", 7 | "subitems": 8 | [{ 9 | "key": "pkgwizard_remove_settings", 10 | "desc": "Alle Daten und Einstellungen entfernen" 11 | }] 12 | }] 13 | }] 14 | -------------------------------------------------------------------------------- /conf/privilege: -------------------------------------------------------------------------------- 1 | { 2 | "defaults":{ 3 | "run-as": "package" 4 | }, 5 | "username": "BasicBackup", 6 | "join-groupname": "system" 7 | } 8 | -------------------------------------------------------------------------------- /conf/resource: -------------------------------------------------------------------------------- 1 | { 2 | "usr-local-linker": { 3 | "bin": ["usr/local/bin/BasicBackup"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /scripts/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exit 0 4 | -------------------------------------------------------------------------------- /scripts/postuninst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exit 0 4 | -------------------------------------------------------------------------------- /scripts/postupgrade: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Script Environment Variables 4 | # ------------------------------------------------------------------------------------- 5 | # SYNOPKG_PKGNAME = Package identify which is defined in INFO 6 | # SYNOPKG_PKGVER = Package version which is defined in INFO 7 | # SYNOPKG_PKGDEST = Package destination path 8 | # /volume[x]/@appstore/[Package Name] 9 | # SYNOPKG_TEMP_UPGRADE_FOLDER = Temporary upgrade folder 10 | # /volume1/@tmp/synopkg.tmp/[Package Name] 11 | # ------------------------------------------------------------------------------------- 12 | 13 | TIMESTAMP=$(date '+%Y-%m-%d%t%H:%M:%S') 14 | 15 | # Restore user settings 16 | # ------------------------------------------------------------------------------------- 17 | if [ -d "${SYNOPKG_TEMP_UPGRADE_FOLDER}" ]; then 18 | cp -rf ${SYNOPKG_TEMP_UPGRADE_FOLDER}/usersettings/* ${SYNOPKG_PKGDEST}/ui/usersettings 19 | chmod -R 755 ${SYNOPKG_PKGDEST}/ui/usersettings 20 | echo ''${TIMESTAMP}' - Restore user settings from '${SYNOPKG_TEMP_UPGRADE_FOLDER}'/usersettings to '${SYNOPKG_PKGDEST}'/ui/usersettings' >>/tmp/${SYNOPKG_PKGNAME}.history 21 | else 22 | echo ''${TIMESTAMP}' - Restore user settings failed.' >>/tmp/${SYNOPKG_PKGNAME}.history 23 | fi 24 | 25 | # Delete array declaration [var] from all backup configurations, as the array is declared in rsync.sh from version 0.8-400 onwards. 26 | # ------------------------------------------------------------------------------------- 27 | if [ -d "${SYNOPKG_PKGDEST}/ui/usersettings/backupjobs" ]; then 28 | find "${SYNOPKG_PKGDEST}/ui/usersettings/backupjobs" -type f -print0 | xargs -0 -n 1 sed -i -e '/'"declare -A var"'/d' 29 | fi 30 | 31 | echo ''${TIMESTAMP}' - Package update completed.' >>/tmp/${SYNOPKG_PKGNAME}.history 32 | echo "" >>/tmp/${SYNOPKG_PKGNAME}.history 33 | 34 | exit 0 -------------------------------------------------------------------------------- /scripts/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exit 0 4 | -------------------------------------------------------------------------------- /scripts/preuninst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Script Environment Variables 4 | # ------------------------------------------------------------------------------------- 5 | # SYNOPKG_PKGNAME = Package identify which is defined in INFO 6 | # SYNOPKG_PKGVER = Package version which is defined in INFO 7 | # SYNOPKG_PKGDEST = Package destination path 8 | # /volume[x]/@appstore/[Package Name] 9 | # SYNOPKG_TEMP_UPGRADE_FOLDER = Temporary upgrade folder 10 | # /volume1/@tmp/synopkg.tmp/[Package Name] 11 | # ------------------------------------------------------------------------------------- 12 | 13 | TIMESTAMP=$(date '+%Y-%m-%d%t%H:%M:%S') 14 | 15 | # Delete udev rules 16 | # ------------------------------------------------------------------------------------- 17 | 18 | if [ "${pkgwizard_remove_settings}" == "true" ]; then 19 | if [ -f /usr/lib/udev/rules.d/99-autopilot.rules ]; then 20 | # Check if AutoPilot UDEV rule points to Basic Backup 21 | udev_appcheck=$(grep -w /usr/lib/udev/rules.d/99-autopilot.rules -e "BasicBackup") 22 | if [ -n "${udev_appcheck}" ]; then 23 | rm -f /usr/lib/udev/rules.d/99-autopilot.rules 24 | if [ ! -f /usr/lib/udev/rules.d/99-autopilot.rules ]; then 25 | /usr/bin/udevadm control --reload-rules 26 | echo ''${TIMESTAMP}' - AutoPilot UDEV rule has been deleted.' >> /tmp/${SYNOPKG_PKGNAME}.history 27 | else 28 | echo ''${TIMESTAMP}' - The AutoPilot UDEV rule could not be deleted.' >> /tmp/${SYNOPKG_PKGNAME}.history 29 | case $SYNOPKG_DSM_LANGUAGE in 30 | ger) 31 | echo "Hinweis: Die AutoPilot UDEV-Regel konnte nicht gelöscht werden. Um die UDEV-Regel manuell zu löschen, öffnen sie ein Terminal Fenster und geben ein: rm -f /usr/lib/udev/rules.d/99-autopilot.rules " > $SYNOPKG_TEMP_LOGFILE 32 | ;; 33 | *) 34 | echo "Note: The AutoPilot UDEV rule could not be deleted. To delete the UDEV rule manually, open a terminal window and type: rm -f /usr/lib/udev/rules.d/99-autopilot.rules " > $SYNOPKG_TEMP_LOGFILE 35 | ;; 36 | esac 37 | fi 38 | fi 39 | fi 40 | exit 0 41 | elif [ "${pkgwizard_remove_settings}" == "false" ]; then 42 | exit 1 43 | else 44 | exit 0 45 | fi 46 | 47 | -------------------------------------------------------------------------------- /scripts/preupgrade: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Script Environment Variables 4 | # ------------------------------------------------------------------------------------- 5 | # SYNOPKG_PKGNAME = Package identify which is defined in INFO 6 | # SYNOPKG_PKGVER = Package version which is defined in INFO 7 | # SYNOPKG_PKGDEST = Package destination path 8 | # /volume[x]/@appstore/[Package Name] 9 | # SYNOPKG_TEMP_UPGRADE_FOLDER = Temporary upgrade folder 10 | # /volume1/@tmp/synopkg.tmp/[Package Name] 11 | # ------------------------------------------------------------------------------------- 12 | 13 | TIMESTAMP=$(date '+%Y-%m-%d%t%H:%M:%S') 14 | 15 | #case $SYNOPKG_DSM_LANGUAGE in 16 | # ger) 17 | # echo "

Wichtiger Hinweis!

Mit diesem Update wird die bisher in Basic Backup integrierte AutoPilot Funktion als eigenständige App ausgelagert. Du kannst auch weiterhin deine mit Basic Backup erstellen Datensicherungsaufträge über AutoPilot ausführen lassen, indem du dir die App AutoPilot für externe Datenträger von meinem GitHub Repository unter


herunterlädst, installierst und entsprechend konfigurierst. An deinen externen Datenträgern bzw. an der darauf liegenden Scriptdatei autopilot müssen keine Änderungen vorgenommen werden." > $SYNOPKG_TEMP_LOGFILE 18 | # ;; 19 | # enu) 20 | # echo "

Important note!

With this update, the AutoPilot function as a standalone app outsourced. You can continue to run your backup jobs created with Basic Backup via AutoPilot by downloading the app AutoPilot for external media from my GitHub repository at

< a href=\"https://github.com/toafez/AutoPilot/releases\">https://github.com/toafez/AutoPilot/releases

download, install and No changes need to be made to your external data carriers or to the script file autopilot on it ." > $SYNOPKG_TEMP_LOGFILE 21 | # ;; 22 | #esac 23 | 24 | # Backup user settings 25 | # ------------------------------------------------------------------------------------- 26 | if [ ! -d "${SYNOPKG_TEMP_UPGRADE_FOLDER}/usersettings" ]; then 27 | mkdir -p -m 755 ${SYNOPKG_TEMP_UPGRADE_FOLDER}/usersettings 28 | fi 29 | 30 | echo ''${TIMESTAMP}' - Start package update --> '${SYNOPKG_PKGNAME}' '${SYNOPKG_PKGVER}'' >>/tmp/${SYNOPKG_PKGNAME}.history 31 | 32 | if [ -d "${SYNOPKG_PKGDEST}/ui/usersettings" ]; then 33 | cp -rf ${SYNOPKG_PKGDEST}/ui/usersettings/* ${SYNOPKG_TEMP_UPGRADE_FOLDER}/usersettings 34 | echo ''${TIMESTAMP}' - Backup user settings from '${SYNOPKG_PKGDEST}'/ui/usersettings to '${SYNOPKG_TEMP_UPGRADE_FOLDER}'/usersettings' >>/tmp/${SYNOPKG_PKGNAME}.history 35 | else 36 | echo ''${TIMESTAMP}' - Backup user settings failed' >>/tmp/${SYNOPKG_PKGNAME}.history 37 | fi 38 | 39 | exit 0 -------------------------------------------------------------------------------- /scripts/start-stop-status: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | case $1 in 4 | start) 5 | ### Start this package. 6 | BasicBackup "Start" 7 | # echo "The package has been started" > $SYNOPKG_TEMP_LOGFILE 8 | exit 0 9 | ;; 10 | stop) 11 | ### Stop this package. 12 | BasicBackup "Stop" 13 | # echo "The package has been stopped" > $SYNOPKG_TEMP_LOGFILE 14 | exit 0 15 | ;; 16 | status) 17 | ### Check package alive. 18 | if [ -h "/usr/local/bin/BasicBackup" ]; then 19 | exit 0 20 | else 21 | exit 1 22 | fi 23 | ;; 24 | killall) 25 | ;; 26 | log) 27 | exit 0 28 | ;; 29 | esac 30 | -------------------------------------------------------------------------------- /ui/BasicBackup.js: -------------------------------------------------------------------------------- 1 | Ext.namespace("SYNO.SDS.BasicBackup.Utils"); 2 | 3 | Ext.define("SYNO.SDS.BasicBackup.Application", { 4 | extend: "SYNO.SDS.AppInstance", 5 | appWindowName: "SYNO.SDS.BasicBackup.MainWindow", 6 | constructor: function() { 7 | this.callParent(arguments); 8 | } 9 | }); 10 | 11 | Ext.define("SYNO.SDS.BasicBackup.MainWindow", { 12 | extend: "SYNO.SDS.AppWindow", 13 | constructor: function(a) { 14 | this.appInstance = a.appInstance; 15 | SYNO.SDS.BasicBackup.MainWindow.superclass.constructor.call(this, Ext.apply({ 16 | layout: "fit", 17 | resizable: true, 18 | cls: "syno-app-win", 19 | maximizable: true, 20 | minimizable: true, 21 | width: 1024, 22 | height: 768, 23 | html: SYNO.SDS.BasicBackup.Utils.getMainHtml() 24 | }, a)); 25 | SYNO.SDS.BasicBackup.Utils.ApplicationWindow = this; 26 | }, 27 | 28 | onOpen: function() { 29 | SYNO.SDS.BasicBackup.MainWindow.superclass.onOpen.apply(this, arguments); 30 | }, 31 | 32 | onRequest: function(a) { 33 | SYNO.SDS.BasicBackup.MainWindow.superclass.onRequest.call(this, a); 34 | }, 35 | 36 | onClose: function() { 37 | clearTimeout(SYNO.SDS.BasicBackup.TimeOutID); 38 | SYNO.SDS.BasicBackup.TimeOutID = undefined; 39 | SYNO.SDS.BasicBackup.MainWindow.superclass.onClose.apply(this, arguments); 40 | this.doClose(); 41 | return true; 42 | } 43 | }); 44 | 45 | Ext.apply(SYNO.SDS.BasicBackup.Utils, function() { 46 | return { 47 | getMainHtml: function() { 48 | // Timestamp must be inserted here to prevent caching of iFrame 49 | return '