Skip to content

Commit ebd77c8

Browse files
Dan Lavupbrezina
authored andcommitted
hosts: client, adding /home to backup and restore
1 parent 340b419 commit ebd77c8

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

sssd_test_framework/hosts/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def backup(self) -> Any:
113113
backup /etc/sssd "$path/config"
114114
backup /var/log/sssd "$path/logs"
115115
backup /var/lib/sss "$path/lib"
116+
backup /home "$path/home"
116117
117118
echo $path
118119
""",
@@ -148,12 +149,13 @@ def restore(self, backup_data: Any | None) -> None:
148149
fi
149150
}}
150151
151-
rm --force --recursive /etc/sssd /var/lib/sss /var/log/sssd
152+
rm --force --recursive /etc/sssd /var/lib/sss /var/log/sssd /home
152153
restore "{backup_path}/krb5.conf" /etc/krb5.conf
153154
restore "{backup_path}/krb5.keytab" /etc/krb5.keytab
154155
restore "{backup_path}/config" /etc/sssd
155156
restore "{backup_path}/logs" /var/log/sssd
156157
restore "{backup_path}/lib" /var/lib/sss
158+
restore "{backup_path}/home" /home
157159
""",
158160
log_level=ProcessLogLevel.Error,
159161
)

sssd_test_framework/utils/sssd.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -900,20 +900,15 @@ def autofs(self) -> None:
900900
self.sssd.authselect.select("sssd")
901901
self.sssd.enable_responder("autofs")
902902

903-
def mkhomedir(self, homedir: str = "/home") -> None:
903+
def mkhomedir(self) -> None:
904904
"""
905905
Configure SSSD with mkhomedir and oddjobd.
906906
907-
:param homedir: Home directory path.
908-
:type homedir: str | None, optional
909-
910907
#. Select authselect sssd profile with 'with-mkhomedir'
911908
#. Start oddjobd.service
912-
#. Backup home directory
913909
"""
914910
self.sssd.authselect.select("sssd", ["with-mkhomedir"])
915911
self.sssd.svc.start("oddjobd.service")
916-
self.sssd.fs.backup(homedir)
917912

918913
def proxy(
919914
self,

0 commit comments

Comments
 (0)