Installation Server - meks77/ClientServerBackup GitHub Wiki
Put the server executable server-..*.jar the directory where you want to have it. Run the executable.
Windows
Lets expect you want to have the application root dir "C:\Program Files\BackupClientServer".
java -Dapplication.root.dir="C:\Program Files\BackupClientServer" -jar server-0.0.1.jar
Autostart
Currently you must to configure it similar to the client installation.
Linux
Lets expect you want to use /var/BackupClientServer as the root application directory, and you put the executable to this direcotry. Then the invocation looks like this:
java -Dapplication.root.dir=/var/BackupClientServer -jar /var/BackupClientServer/server-0.0.1.jar
Autostart
Depending on your system and your privileges you can add it to
- /etc/init.d
- upstart
Because Ubuntu is used very often, here is an example for upstart.
Ubuntu
Tested with Xubuntu 18.04
Expect
- you want to execute backup-server with the user backup and
- backup-server version is 0.0.1
create the file backupserver.service in /etc/systemd/system
[Unit]
Description=backup server of ClientServerBackup
[Service]
User=backup
WorkingDirectory=/var/BackupClientServer
ExecStart=java -Dapplication.root.dir=/var/BackupClientServer -jar /var/BackupClientServer/server-0.0.1.jar
[Install]
WantedBy=multi-user.target
Then invoke
sudo systemctl daemon-reload
sudo systemctl enable backupserver.service
sudo service backupcserver start
sudo systemctl status backupserver
Synology
Put the executable to ... Create a shell script which is similar to
#!/bin/bash
java -Djava.io.tmp=/var/services/clientServerBackup/tmp -Dapplication.root.dir=/var/services/clientServerBackup -jar server-0.0.1x-SNAPSHOT.jar
The temporary directory must be set on the nas, because the default temporary directory is very small. Uploaded files are put first to the temporary directory, but if it is to small, an exception occurs.
Create a directory, which is not accessible via cfs or nfs. It is more safe if the backup is not available to the clients via the file system.
- Open the Control Panel
- Click on Task Scheduler
- Click create
- Select triggerd task
- Fill in a name
- select system start as triggered event
- click task settings
- put "bash ${path_to_your_script}" to User-defined script
More Details at https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/system_taskscheduler