Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
621f8ba
snappy
biswazr Jan 25, 2023
aaa1767
no snaoppy
biswazr Jan 25, 2023
83e2556
just only tag
biswazr Feb 13, 2023
c41a135
test
biswazr Feb 13, 2023
8dc9842
test
biswazr Feb 13, 2023
4c72c4e
test
biswazr Feb 13, 2023
15d6756
github
biswazr Feb 13, 2023
ba0b8f7
github
biswazr Feb 13, 2023
14ff6fe
new rpm builder with 2.7.16
biswazr Feb 14, 2023
986c44a
config remove
biswazr Feb 14, 2023
39e51a4
config remove
biswazr Feb 14, 2023
0fccb9c
config remove
biswazr Feb 14, 2023
0ec75e6
revert
biswazr Feb 14, 2023
47bedf3
revert
biswazr Feb 14, 2023
50adfee
check
biswazr Feb 14, 2023
2ab33e1
should
biswazr Feb 14, 2023
ad00055
try
biswazr Feb 14, 2023
e4fe1a2
try
biswazr Feb 14, 2023
04e58db
1.4.2
biswazr Feb 14, 2023
6936b7a
some logging
biswazr Feb 20, 2023
8cfb8be
some logging for error
biswazr Feb 20, 2023
bf41090
version risk
biswazr Feb 21, 2023
a91857c
version risk
biswazr Feb 21, 2023
68499d6
using Looseversion rather weierd tuple way
biswazr Feb 21, 2023
0aecaa3
fixed the bug with tuple
biswazr Feb 21, 2023
e55cfd2
a change to support uri with compression
biswazr Feb 22, 2023
31d7bc6
a change to support uri with compression
biswazr Feb 22, 2023
f009823
a change to support uri with compression
biswazr Feb 22, 2023
f27fbef
fix for db
biswazr Feb 22, 2023
6445c3e
fix for db
biswazr Feb 22, 2023
02dd454
urllib
biswazr Feb 22, 2023
ed0fa7c
urllib py2
biswazr Feb 22, 2023
f7cf55f
uri in place of host
biswazr Feb 22, 2023
2fd6227
uri in place of host
biswazr Feb 22, 2023
3b5769a
uri in place of host
biswazr Feb 22, 2023
fcd9a9d
uri in place of host
biswazr Feb 22, 2023
5aed1b1
uri in place of host
biswazr Feb 22, 2023
1ba0141
uri in place of host
biswazr Feb 22, 2023
2cc9ffe
uri in place of host with port
biswazr Feb 22, 2023
94a966f
zlib,zstd
biswazr Feb 22, 2023
230fe07
check again
biswazr Feb 22, 2023
5e8fa4a
fix
biswazr Feb 22, 2023
b50dffc
use master
biswazr Feb 22, 2023
adada12
updated comment
biswazr Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,12 @@ jobs:

environment:
PYTHON_BIN: /usr/local/bin/python2.7

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-


- run:
name: set version and build the rpm
command: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tmp
*.pyc
.idea
*.iml
.history*
venv*
.local*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.1
1.4.2
10 changes: 9 additions & 1 deletion mongodb_consistent_backup/Backup/Mongodump/MongodumpThread.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import logging
import sys
from distutils.version import LooseVersion

from multiprocessing import Process
from select import select
Expand Down Expand Up @@ -73,7 +74,7 @@ def do_ssl_insecure(self):

def is_version_gte(self, compare):
if os.path.isfile(self.binary) and os.access(self.binary, os.X_OK):
if tuple(compare.split(".")) <= tuple(self.version.split(".")):
if LooseVersion(compare) <= LooseVersion(self.version):
return True
return False

Expand Down Expand Up @@ -168,6 +169,12 @@ def mongodump_cmd(self):
mongodump_flags.extend([
"--out=%s/dump" % self.backup_dir
])
if self.is_version_gte("4.2.0"):
logging.info("MongoDump Version higher that 4.2.0 found extending mongodump with snppy compressor flag")
## https://www.mongodb.com/docs/drivers/node/v4.4/fundamentals/connection/network-compression/
mongodump_flags.extend([
"--compressors=%s" % "snappy,zlib,zstd"
])

# --numParallelCollections
if self.threads > 0:
Expand Down Expand Up @@ -222,6 +229,7 @@ def mongodump_cmd(self):
sys.exit(1)

mongodump_cmd.extend(mongodump_flags)
logging.info("-----mongodump_cmd: %s" % mongodump_cmd)
return mongodump_cmd

def run(self):
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ if [ -d ${srcdir} ]; then
exit 1
fi

# build fails on Pex 1.5+
${venvdir}/bin/python2.7 ${venvdir}/bin/pip install ${pip_flags} "pex<=1.4"
# build work with pex<=2.1.120 as of 23 feb 2023
${venvdir}/bin/python2.7 ${venvdir}/bin/pip install ${pip_flags} "pex<=2.1.120"
if [ $? -gt 0 ]; then
echo "Failed to install pex utility for building!"
exit 1
Expand Down