-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add systemd and default config files * Update deb package instructions --------- Co-authored-by: yrizhkov <[email protected]>
- Loading branch information
Showing
11 changed files
with
125 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
.idea | ||
.vscode | ||
.DS_Store | ||
|
||
lib/ | ||
target/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# DEB package | ||
|
||
## Install | ||
|
||
### Installation | ||
```shell | ||
cd target && sudo dpkg -i aerospike-backup-service_0.1.0-1_amd64.deb | ||
``` | ||
|
||
### Verify Installation | ||
```shell | ||
sudo systemctl status aerospike-backup-service | ||
``` | ||
|
||
Should get the following output | ||
``` | ||
● aerospike-backup-service.service - Aerospike Backup Service | ||
Loaded: loaded (/lib/systemd/system/aerospike-backup-service.service; enabled; vendor preset: enabled) | ||
Active: active (running) since Wed 2023-12-20 11:08:58 UTC; 14min ago | ||
Main PID: 229439 (aerospike-backu) | ||
Tasks: 26 (limit: 19160) | ||
Memory: 32.3M | ||
CPU: 6.562s | ||
CGroup: /system.slice/aerospike-backup-service.service | ||
└─229439 /usr/bin/aerospike-backup-service --config /etc/aerospike-backup-service/aerospike-backup-service.yml | ||
``` | ||
|
||
### Modify service configuration | ||
```shell | ||
sudo vi /etc/aerospike-backup-service/aerospike-backup-service.yml | ||
``` | ||
|
||
Restart service | ||
```shell | ||
sudo systemctl restart aerospike-backup-service | ||
``` | ||
|
||
### Check service logs | ||
```shell | ||
sudo journalctl -u aerospike-backup-service -n 100 --no-page -f | ||
``` | ||
|
||
## Uninstall | ||
|
||
Stop the service | ||
```shell | ||
sudo systemctl stop aerospike-backup-service | ||
``` | ||
|
||
### Remove service | ||
* keeping the configuration | ||
```shell | ||
sudo dpkg -r aerospike-backup-service | ||
``` | ||
|
||
* completely | ||
```shell | ||
sudo dpkg -P aerospike-backup-service | ||
``` | ||
|
||
To remove the backup files run | ||
```shell | ||
sudo rm -rf /var/lib/aerospike-backup-service | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
aerospike-clusters: | ||
cluster1: | ||
host: "127.0.0.1" | ||
port: 3000 | ||
user: "admin" | ||
password: "admin" | ||
|
||
storage: | ||
local1: | ||
type: 0 | ||
path: "/var/lib/aerospike-backup-service" | ||
|
||
backup-policies: | ||
policy1: | ||
type: 1 | ||
parallel: 1 | ||
remove-files: false | ||
|
||
backup-routines: | ||
routine1: | ||
interval: 30000 | ||
incr-interval: 5000 | ||
backup-policy: "policy1" | ||
source-cluster: "cluster1" | ||
storage: "local1" | ||
namespace: "test" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Aerospike Backup Service | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/aerospike-backup-service --config /etc/aerospike-backup-service/aerospike-backup-service.yml | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
aerospike-backup-service (1.0.0-1) unstable; urgency=low | ||
aerospike-backup-service (0.1.0-1) unstable; urgency=low | ||
* Initial Release | ||
-- David Gerchikov <[email protected]> Tue, 19 Dec 2023 11:55:00 +0200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
Source: aerospike-backup-service | ||
Section: misc | ||
Priority: optional | ||
Version: 1.0.0-1 | ||
Version: ${abs:version} | ||
Maintainer: Aerospike <[email protected]> | ||
Build-Depends: debhelper, debhelper-compat (= 13) | ||
|
||
Package: aerospike-backup-service | ||
Architecture: amd64 | ||
Architecture: amd64 arm64 | ||
Depends: libc6 | ||
Description: Aerospike Backup Service | ||
This package provides backup and restore capabilities | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/usr/bin | ||
/usr/lib | ||
/var/lib/aerospike-backup-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
../target/aerospike-backup-service /usr/bin/ | ||
../target/aerospike-backup-service /usr/bin | ||
../lib/* /usr/lib | ||
config/aerospike-backup-service.yml /etc/aerospike-backup-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
#!/usr/bin/make -f | ||
export DH_VERBOSE=1 | ||
SOURCE_DIR := $(shell git rev-parse --show-toplevel) | ||
BINARY_NAME := aerospike-backup-service | ||
BINARY_NAME := $(shell basename $(SOURCE_DIR)) | ||
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) | ||
VERSION := $(shell cat $(SOURCE_DIR)/VERSION) | ||
%: | ||
dh $@ | ||
override_dh_auto_configure: | ||
cd $(SOURCE_DIR)/modules/aerospike-tools-backup && git submodule update --init --recursive | ||
(cd $(SOURCE_DIR); $(MAKE) prep-submodules) | ||
dh_auto_configure | ||
override_dh_installchangelogs: | ||
dh_installchangelogs | ||
override_dh_installman: | ||
dh_installman | ||
dh_installman man/$(BINARY_NAME).1 | ||
override_dh_installdocs: | ||
dh_installdocs | ||
override_dh_auto_build: | ||
(cd $(SOURCE_DIR); $(MAKE) build-submodules; $(MAKE) build) | ||
dh_auto_build | ||
override_dh_dwz: | ||
|
||
override_dh_installsystemd: | ||
dh_installsystemd $(BINARY_NAME).service | ||
|
||
override_dh_clean: | ||
set -x | ||
dh_clean |