Skip to content

Commit

Permalink
DD ingress buffering
Browse files Browse the repository at this point in the history
On remote server it seems to be beneficial to buffer data before dumping
it on drive. Especially if underlying FS sync's all. This happens to be
the call over NFS.
  • Loading branch information
Andrew Azarov committed Dec 28, 2015
1 parent 4d1ae4b commit 41e4050
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gnt_ext_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, **kwargs):
self.lv_backup_extension = 'bak'
self.backup_folder = './upload/'
self.backup_extension = 'raw'
self.compression = {'egress': '| lz4 -1c |', 'ingress': 'lz4 -dc >'}
self.compression = {'egress': '| lz4 -1c |', 'ingress': 'lz4 -dc |'}
self.debug = 0
self.instances_names = None
self.dd_buffer = '128M'
Expand Down Expand Up @@ -132,7 +132,8 @@ def perform_backup(self):
self.compression['egress'],
self.ssh_cmd,
"'" + self.compression['ingress'],
self.backup_folder +
"dd bs=" + self.dd_buffer,
"of=" + self.backup_folder +
'.'.join(
[self.unique_id, drive['lv'], name, primary_node, self.backup_extension]),
"'\""
Expand Down

0 comments on commit 41e4050

Please sign in to comment.