mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-01 09:17:02 +00:00
borg upgrade - fix README contents
This commit is contained in:
parent
8671be1ef2
commit
e9ab11be49
1 changed files with 7 additions and 0 deletions
|
@ -50,11 +50,18 @@ def upgrade(self, dryrun=True, inplace=False):
|
||||||
try:
|
try:
|
||||||
self.convert_cache(dryrun)
|
self.convert_cache(dryrun)
|
||||||
self.convert_segments(segments, dryrun=dryrun, inplace=inplace)
|
self.convert_segments(segments, dryrun=dryrun, inplace=inplace)
|
||||||
|
self.borg_readme()
|
||||||
finally:
|
finally:
|
||||||
self.lock.release()
|
self.lock.release()
|
||||||
self.lock = None
|
self.lock = None
|
||||||
return backup
|
return backup
|
||||||
|
|
||||||
|
def borg_readme(self):
|
||||||
|
readme = os.path.join(self.path, 'README')
|
||||||
|
os.remove(readme)
|
||||||
|
with open(readme, 'w') as fd:
|
||||||
|
fd.write('This is a Borg repository\n')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def convert_segments(segments, dryrun=True, inplace=False):
|
def convert_segments(segments, dryrun=True, inplace=False):
|
||||||
"""convert repository segments from attic to borg
|
"""convert repository segments from attic to borg
|
||||||
|
|
Loading…
Reference in a new issue