Include --xattrs when creating the undercloud backup.

We need to use --xattrs when running the backup, otherwise
swift objects after the restore won't be accesible.

(cherry picked from commit bd11ebccfe) 
Change-Id: I62e5488c78c95368f6b6b967a5504ff3478f1fce
Closes-Bug: 1778215
This commit is contained in:
Carlos Camacho 2018-06-22 14:32:09 +02:00
parent 6223f9b413
commit feef6e73b9
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ class CreateFileSystemBackup(base.Action):
script = """
#!/bin/bash
sudo tar --ignore-failed-read -C / -cf %s %s
sudo tar --xattrs --ignore-failed-read -C / -cf %s %s
sudo chown mistral. %s
""" % (self.outfile, separated_string, self.outfile)

View File

@ -114,7 +114,7 @@ class CreateFileSystemBackupTest(base.TestCase):
self.fsback.logger = mock.Mock()
self.fsback.run(mock_get_object_client)
assert_string = ('\n #!/bin/bash\n '
'sudo tar --ignore-failed-read -C / '
'sudo tar --xattrs --ignore-failed-read -C / '
'-cf ' +
self.fsback.outfile +
' /home/stack/ /etc/hosts\n '