Skip to content

Commit ae4e47d

Browse files
committed
Merge branch 'hotfix-0.1.7' into stable
2 parents 538aeb8 + 2848645 commit ae4e47d

File tree

7 files changed

+27
-55
lines changed

7 files changed

+27
-55
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.1.7
4+
- Upgrade baseimage: light-baseimage:0.2.5
5+
36
## 0.1.6
47
- Upgrade baseimage: light-baseimage:0.2.4
58

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/backup-manager
2-
VERSION = 0.1.6
2+
VERSION = 0.1.7
33

44
.PHONY: all build build-nocache test tag_latest release
55

@@ -15,7 +15,7 @@ test:
1515
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
1616

1717
tag_latest:
18-
docker tag -f $(NAME):$(VERSION) $(NAME):latest
18+
docker tag $(NAME):$(VERSION) $(NAME):latest
1919

2020
release: build test tag_latest
2121
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[hub]: https://hub.docker.com/r/osixia/backup-manager/
77

8-
Latest release: 0.1.6 - Backup Manager 0.7.10.1 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/backup-manager/) 
8+
Latest release: 0.1.7 - Backup Manager 0.7.10.1 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/backup-manager/) 
99

1010
An image to run periodically backup-manager.
1111

@@ -22,7 +22,7 @@ An image to run periodically backup-manager.
2222
- [Link environment file](#link-environment-file)
2323
- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
2424
- [Advanced User Guide](#advanced-user-guide)
25-
- [Extend osixia/backup-manager:0.1.6 image](#extend-osixiabackup-manager016-image)
25+
- [Extend osixia/backup-manager:0.1.7 image](#extend-osixiabackup-manager017-image)
2626
- [Make your own backup-manager image](#make-your-own-backup-manager-image)
2727
- [Tests](#tests)
2828
- [Under the hood: osixia/light-baseimage](#under-the-hood-osixialight-baseimage)
@@ -31,7 +31,7 @@ An image to run periodically backup-manager.
3131
## Quick start
3232

3333
# Run Backup Manager image
34-
docker run --volume /host/data:/data-to-backup --detach osixia/backup-manager:0.1.6
34+
docker run --volume /host/data:/data-to-backup --detach osixia/backup-manager:0.1.7
3535

3636
## Beginner Guide
3737

@@ -50,7 +50,7 @@ but setting your own backup-manager.conf is possible. 2 options:
5050

5151
- Link your config file at run time to `/container/service/backup-manager/assets/backup-manager.conf` :
5252

53-
docker run --volume /data/my-backup-manager.conf:/container/service/backup-manager/assets/backup-manager.conf --detach osixia/backup-manager:0.1.6
53+
docker run --volume /data/my-backup-manager.conf:/container/service/backup-manager/assets/backup-manager.conf --detach osixia/backup-manager:0.1.7
5454

5555
- Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide)
5656

@@ -60,7 +60,7 @@ You may have some problems with mounted files on some systems. The startup scrip
6060

6161
To fix that run the container with `--copy-service` argument :
6262

63-
docker run [your options] osixia/backup-manager:0.1.6 --copy-service
63+
docker run [your options] osixia/backup-manager:0.1.7 --copy-service
6464

6565
### Debug
6666

@@ -69,11 +69,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
6969

7070
Example command to run the container in `debug` mode:
7171

72-
docker run --detach osixia/backup-manager:0.1.6 --loglevel debug
72+
docker run --detach osixia/backup-manager:0.1.7 --loglevel debug
7373

7474
See all command line options:
7575

76-
docker run osixia/backup-manager:0.1.6 --help
76+
docker run osixia/backup-manager:0.1.7 --help
7777

7878
## Environment Variables
7979

@@ -84,7 +84,7 @@ See how to [set your own environment variables](#set-your-own-environment-variab
8484

8585
- **BACKUP_MANAGER_TARBALL_DIRECTORIES**: Directories to backup: paths without spaces in their name. Defaults to `/data-to-backup /data-to-backup2`.
8686

87-
- **BACKUP_MANAGER_CRON_EXP**: Cron expression to schedule backup-manager execution. Defaults to `"0 4 * * *"`. Every days at 4am.
87+
- **BACKUP_MANAGER_CRON_EXP**: Cron expression to schedule backup-manager execution. Defaults to `0 4 * * *`. Every days at 4am.
8888

8989
- **BACKUP_MANAGER_TTL**: Backup TTL in days. Defaults to `15`.
9090

@@ -112,14 +112,14 @@ More help: https://raw.githubusercontent.com/sukria/Backup-Manager/master/doc/us
112112
Environment variables can be set by adding the --env argument in the command line, for example:
113113

114114
docker run --env BACKUP_MANAGER_TARBALL_DIRECTORIES="/home/billy" \
115-
--detach osixia/backup-manager:0.1.6
115+
--detach osixia/backup-manager:0.1.7
116116

117117
#### Link environment file
118118

119119
For example if your environment file is in : /data/backup-manager/environment/my-env.yaml
120120

121121
docker run --volume /data/backup-manager/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
122-
--detach osixia/backup-manager:0.1.6
122+
--detach osixia/backup-manager:0.1.7
123123

124124
Take care to link your environment file to `/container/environment/XX-somedir` (with XX < 99 so they will be processed before default environment files) and not directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).
125125

@@ -129,13 +129,13 @@ This is the best solution if you have a private registry. Please refer to the [A
129129

130130
## Advanced User Guide
131131

132-
### Extend osixia/backup-manager:0.1.6 image
132+
### Extend osixia/backup-manager:0.1.7 image
133133

134134
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
135135

136136
Dockerfile example:
137137

138-
FROM osixia/backup-manager:0.1.6
138+
FROM osixia/backup-manager:0.1.7
139139
MAINTAINER Your Name <[email protected]>
140140

141141
ADD environment /container/environment/01-custom
@@ -153,7 +153,7 @@ Clone this project :
153153
Adapt Makefile, set your image NAME and VERSION, for example :
154154

155155
NAME = osixia/backup-manager
156-
VERSION = 0.1.6
156+
VERSION = 0.1.7
157157

158158
becomes :
159159
NAME = billy-the-king/backup-manager

image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Use osixia/light-baseimage
22
# sources: https://github.com/osixia/docker-light-baseimage
3-
FROM osixia/light-baseimage:0.2.4
3+
FROM osixia/light-baseimage:0.2.5
44
MAINTAINER Bertrand Gouny <[email protected]>
55

66
# Install Backup Manager, GNUPG for encryption and cron from baseimage

image/environment/default.yaml renamed to image/environment/default.startup.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Directories to backup: paths without spaces in their name
2-
BACKUP_MANAGER_TARBALL_DIRECTORIES: "/data-to-backup /data-to-backup2"
2+
BACKUP_MANAGER_TARBALL_DIRECTORIES: /data-to-backup /data-to-backup2
33

44
# Run backup-manager at 4:00am
5-
BACKUP_MANAGER_CRON_EXP: "0 4 * * *"
5+
BACKUP_MANAGER_CRON_EXP: 0 4 * * *
66

77
# Delete backups that are over 15 days
88
BACKUP_MANAGER_TTL: 15
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# Backup OpenLDAP config
1+
# Backup
22
{{ BACKUP_MANAGER_CRON_EXP }} root /usr/sbin/backup-manager 2>&1 | /usr/bin/logger -s -t backup-manager
3+
# empty line

test/test_helper.bash

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,10 @@ clear_container() {
3030
remove_containers_by_cid $CONTAINER_ID
3131
}
3232

33-
is_service_running() {
34-
is_service_running_by_cid $CONTAINER_ID $1
33+
wait_process() {
34+
wait_process_by_cid $CONTAINER_ID $@
3535
}
3636

37-
is_file_exists() {
38-
is_file_exists_by_cid $CONTAINER_ID $1
39-
}
40-
41-
wait_service() {
42-
wait_service_by_cid $CONTAINER_ID $@
43-
}
44-
45-
4637
# generic functions
4738
get_container_ip_by_cid() {
4839
local IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $1)
@@ -78,30 +69,7 @@ clear_containers_by_cid() {
7869
remove_containers_by_cid $@
7970
}
8071

81-
is_service_running_by_cid() {
82-
docker exec $1 ps cax | grep $2 > /dev/null
83-
}
84-
85-
is_file_exists_by_cid() {
86-
docker exec $1 cat $2 > /dev/null 2>&1
87-
}
88-
89-
wait_service_by_cid() {
90-
72+
wait_process_by_cid() {
9173
cid=$1
92-
93-
# first wait image init end
94-
while ! is_file_exists_by_cid $cid /container/run/state/startup-done
95-
do
96-
sleep 0.5
97-
done
98-
99-
for service in "${@:2}"
100-
do
101-
# wait service
102-
while ! is_service_running_by_cid $cid $service
103-
do
104-
sleep 0.5
105-
done
106-
done
74+
docker exec $cid /container/tool/wait-process ${@:2}
10775
}

0 commit comments

Comments
 (0)