Skip to content

Commit db86581

Browse files
Doc updates
1 parent 939ad01 commit db86581

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.rst

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The backups are mongorestore compatible. The *--oplogReplay* flag **MUST** be pr
123123
Run as Docker Container (Experimental)
124124
~~~~~~~~~~~~~~~~~~~~~~~
125125

126-
*Note: you need to use persistent volumes to store backups long-term on disk when using Docker. Data in Docker containers is destroyed when the container is deleted.*
126+
*Note: you need to use persistent volumes to store backups and/or config files long-term when using Docker. Data in Docker containers is destroyed when the container is deleted.*
127127

128128
**Via Docker Hub**
129129

@@ -147,7 +147,7 @@ ZBackup Archiving (Optional)
147147

148148
ZBackup offers block de-duplication and compression of backups and optionally supports AES-128 encryption at rest. The ZBackup archive method causes backups to be stored via ZBackup at archive time.
149149

150-
To enable, ZBackup must be installed on your system and the 'archive.method' config file variable *(or --archive.method flag=)* must be set to 'zbackup'.
150+
To enable, ZBackup must be installed on your system and the 'archive.method' config file variable *(or --archive.method flag=)* must be set to 'zbackup'. ZBackup's compression works best if compression is disabled in the backup phase, to do this set 'backup.<method>.compression' to 'none'.
151151

152152
**Install on CentOS/RHEL**
153153

@@ -161,21 +161,33 @@ To enable, ZBackup must be installed on your system and the 'archive.method' con
161161

162162
$ apt-get install zbackup
163163

164-
ZBackup data is stored in a repository directory named *'mongodb_consistent_backup-zbackup'* and must be restored using a 'zbackup restore ...' command.
165164

166165
**Get Backup from ZBackup**
167166

167+
ZBackup data is stored in a storage directory named *'mongodb_consistent_backup-zbackup'* and must be restored using a 'zbackup restore ...' command.
168+
168169
::
169170

170171
$ zbackup restore --password-file /etc/zbackup.passwd /mnt/backup/default/mongodb_consistent_backup-zbackup/backups/20170424_0000.tar | tar -xf
172+
173+
**Delete Backup from ZBackup**
174+
175+
To remove a backup, first delete the .tar file in 'backups' subdir of the ZBackup storage directory. After run a 'zbackup gc full' to remove unused data.
176+
177+
::
178+
179+
$ rm -f /mnt/backup/default/mongodb_consistent_backup-zbackup/backups/20170424_0000.tar
180+
$ zbackup gc full --password-file /etc/zbackup.passwd /mnt/backup/default/mongodb_consistent_backup-zbackup
171181
172182
Roadmap
173183
~~~~~~~
174184

175185
- "Distributed Mode" for running backup on remote hosts *(vs. only on one host)*
176-
- Support more notification methods *(Prometheus, PagerDuty, etc)* and upload methods *(Google Cloud Storage, Rsync, etc)*
186+
- Backup retention/rotation *(eg: delete old backups)*
187+
- Support more notification methods *(Prometheus, PagerDuty, etc)*
188+
- Support more upload methods *(Google Cloud Storage, Rsync, etc)*
177189
- Support SSL MongoDB connections
178-
- Unit tests
190+
- Python unit tests
179191

180192
Contact
181193
~~~~~~~

mongodb_consistent_backup/Archive/Tar/Tar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ def run(self):
7474
self._pool.terminate()
7575
logging.fatal("Could not create tar archiving thread! Error: %s" % e)
7676
raise Error(e)
77-
self.wait()
78-
self.completed = True
77+
finally:
78+
self.wait()
79+
self.completed = True
7980

8081
def close(self, code=None, frame=None):
8182
if not self.stopped and self._pool is not None:

0 commit comments

Comments
 (0)