Merge lp:~cjwatson/turku/turku-storage-preserve-hard-links into lp:turku

Proposed by Colin Watson
Status: Merged
Approved by: Nick Moffitt
Approved revision: 36
Merged at revision: 36
Proposed branch: lp:~cjwatson/turku/turku-storage-preserve-hard-links
Merge into: lp:turku
Diff against target: 25 lines (+4/-0)
2 files modified
turku_storage/ping.py (+2/-0)
turku_storage/utils.py (+2/-0)
To merge this branch: bzr merge lp:~cjwatson/turku/turku-storage-preserve-hard-links
Reviewer Review Type Date Requested Status
Turku Pending
Review via email: mp+374826@code.launchpad.net

Commit message

Add a configuration option to preserve hard links.

Description of the change

This can be expensive, so we shouldn't do it for every source. However, the git service uses hard links when creating subordinate repositories, and not preserving these may cause a significant amount of backup bloat.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 36

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'turku_storage/ping.py'
2--- turku_storage/ping.py 2019-05-22 17:35:00 +0000
3+++ turku_storage/ping.py 2019-10-29 10:14:53 +0000
4@@ -202,6 +202,8 @@
5 rsync_args.append('--link-dest=%s' % os.path.join(snapshot_dir, base_snapshot))
6 else:
7 rsync_args.append('--inplace')
8+ if self.config['preserve_hard_links']:
9+ rsync_args.append('--hard-links')
10
11 filter_file = None
12 filter_data = ''
13
14=== modified file 'turku_storage/utils.py'
15--- turku_storage/utils.py 2019-05-22 17:35:00 +0000
16+++ turku_storage/utils.py 2019-10-29 10:14:53 +0000
17@@ -188,6 +188,8 @@
18
19 if 'snapshot_mode' not in config:
20 config['snapshot_mode'] = 'link-dest'
21+ if 'preserve_hard_links' not in config:
22+ config['preserve_hard_links'] = False
23
24 if 'ssh_ping_host' not in config:
25 config['ssh_ping_host'] = socket.getfqdn()

Subscribers

People subscribed via source and target branches

to all changes: