Skip to content

Commit d780ad5

Browse files
Merge pull request #112 from Percona-Lab/MCB_1.0
mongodb_consistent_backup 1.0: Wrap-up merge of MCB_1.0 branch -> master
2 parents a9bed81 + ed8d329 commit d780ad5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+3821
-2121
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
bin
22
build
3-
rpmbuild
3+
tmp
44
*.pyc
55
.idea

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM centos:centos7
2+
MAINTAINER Tim Vaillancourt <tim.vaillancourt@percona.com>
3+
RUN yum install -y https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-4.noarch.rpm && \
4+
yum install -y Percona-Server-MongoDB-32-tools && yum clean all && \
5+
curl -Lo /usr/bin/mongodb-consistent-backup https://github.com/Percona-Lab/mongodb_consistent_backup/releases/download/0.4.0/mongodb-consistent-backup.el7.x86_64 && \
6+
chmod +x /usr/bin/mongodb-consistent-backup
7+
ENTRYPOINT ["mongodb-consistent-backup"]
8+
CMD ["--help"]

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include LICENSE
2+
include README.rst

Makefile

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
11
# To install to a different prefix use "make PREFIX=/your/path install, default = /usr/local"
22
#
3+
4+
NAME=mongodb_consistent_backup
5+
VERSION=$(shell cat VERSION | cut -d- -f1)
36
PREFIX?=/usr/local
4-
BASEDIR=$(DESTDIR)$(PREFIX)
5-
BINDIR=$(BASEDIR)/bin
6-
VERSION=$(shell cat VERSION)
7+
BASEDIR?=$(DESTDIR)$(PREFIX)
8+
BINDIR?=$(BASEDIR)/bin
9+
SHAREDIR?=$(BASEDIR)/share
10+
711

812
all: bin/mongodb-consistent-backup
913

10-
bin/mongodb-consistent-backup: setup.py requirements.txt VERSION scripts/build.sh MongoBackup/*.py MongoBackup/Common/*.py MongoBackup/Methods/*.py MongoBackup/Notify/*.py MongoBackup/Oplog/*.py MongoBackup/Upload/*.py
14+
bin/mongodb-consistent-backup: setup.py requirements.txt README.rst VERSION scripts/build.sh $(NAME)/*.py $(NAME)/*/*.py $(NAME)/*/*/*.py
1115
PYTHON_BIN=$(PYTHON_BIN) VIRTUALENV_BIN=$(VIRTUALENV_BIN) bash scripts/build.sh
1216

1317
install: bin/mongodb-consistent-backup
14-
mkdir -p $(BINDIR) || true
18+
rm -rf bin build 2>/dev/null
19+
mkdir -p $(BINDIR) $(SHAREDIR)/$(NAME) || true
1520
install -m 0755 bin/mongodb-consistent-backup $(BINDIR)/mongodb-consistent-backup
21+
install -m 0644 conf/mongodb-consistent-backup.example.conf $(SHAREDIR)/$(NAME)/example.conf
22+
install -m 0644 LICENSE $(SHAREDIR)/$(NAME)/LICENSE
23+
install -m 0644 README.rst $(SHAREDIR)/$(NAME)/README.rst
1624

1725
uninstall:
1826
rm -f $(BINDIR)/mongodb-consistent-backup
27+
rm -rf $(SHAREDIR)/$(NAME)
28+
29+
rpm: bin/mongodb-consistent-backup
30+
rm -rf build/rpm 2>/dev/null || true
31+
mkdir -p build/rpm/SOURCES
32+
cp -f $(PWD)/{LICENSE,README.rst} build/rpm/SOURCES
33+
cp -f $(PWD)/bin/mongodb-consistent-backup build/rpm/SOURCES/mongodb-consistent-backup
34+
cp -f $(PWD)/conf/mongodb-consistent-backup.example.conf build/rpm/SOURCES/mongodb-consistent-backup.conf
35+
rpmbuild -D "_topdir $(PWD)/build/rpm" -D "version $(VERSION)" -bb scripts/$(NAME).spec
1936

20-
rpm:
21-
rm -rf rpmbuild
22-
mkdir -p rpmbuild/{SPECS,SOURCES/mongodb_consistent_backup}
23-
cp -dpR MongoBackup conf Makefile setup.py scripts requirements.txt LICENSE README.md VERSION rpmbuild/SOURCES/mongodb_consistent_backup
24-
cp -dp scripts/mongodb_consistent_backup.spec rpmbuild/SPECS/mongodb_consistent_backup.spec
25-
tar --remove-files -C rpmbuild/SOURCES -czf rpmbuild/SOURCES/mongodb_consistent_backup.tar.gz mongodb_consistent_backup
26-
rpmbuild -D "_topdir $(PWD)/rpmbuild" -D "version $(VERSION)" -bb rpmbuild/SPECS/mongodb_consistent_backup.spec
37+
docker:
38+
docker build --no-cache -t mongodb_consistent_backup .
2739

2840
clean:
29-
rm -rf bin build rpmbuild
41+
rm -rf bin build $(NAME).egg-info tmp 2>/dev/null

MongoBackup/Archiver.py

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)