Bug 2262860 - ipa-restore fails with 'Cannot restore a data backup into an empty system'
Summary: ipa-restore fails with 'Cannot restore a data backup into an empty system'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-05 20:06 UTC by jstephen
Modified: 2024-02-26 15:54 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-02-26 15:54:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-10765 0 None None None 2024-02-05 20:09:09 UTC

Description jstephen 2024-02-05 20:06:38 UTC
On a clean IPA server install in Fedora rawhide (freeipa-server-4.11.1-2.fc40.x86_64) the following commands fail.

[root@server ~]# ipa-backup --data --online                                                                                                                                                                                                    
Preparing backup on server.ipa.test                                                                                                                           
Local roles match globally used roles, proceeding.                                                                                                            
Backing up userRoot in IPA-TEST to LDIF                                                                                                                       
Waiting for LDIF to finish                                                                                                                                    
Backing up IPA-TEST                                                                                                                                           
Waiting for BAK to finish                                                                                                                                     
Backed up to /var/lib/ipa/backup/ipa-data-2024-02-05-20-02-50                                                                                                 
The ipa-backup command was successful

                                                                                                                                                                                                                                         
[root@server ~]# ipa-restore --unattended --password Secret123 --data --online ipa-data-2024-02-05-20-02-50                                                                                                                                    
Preparing restore from /var/lib/ipa/backup/ipa-data-2024-02-05-20-02-50 on server.ipa.test                                                                    
Cannot restore a data backup into an empty system                                                                                                             
The ipa-restore command failed. See /var/log/iparestore.log for more information 



[root@server ~]# cat /var/log/iparestore.log                                                                                                                                                                                                                                                               15:04:55 [133/405]
2024-02-05T18:37:50Z DEBUG Logging to /var/log/iparestore.log                                                                                                                                                                                                                                                                
2024-02-05T18:37:50Z DEBUG ipa-restore was invoked with arguments ['ipa-data-2024-02-05-18-36-26'] and options: {'verbose': False, 'quiet': False, 'log_file': None, 'password': 'Secret123', 'gpg_keyring': None, 'data_only': True, 'online': True, 'instance': None, 'backend': None, 'no_logs': False, 'unattended': True
}                                                                                                                                                                                                                                                                                                                            
2024-02-05T18:37:50Z DEBUG IPA version 4.11.1-2.fc40                                                                                                                                                                                                                                                                         
2024-02-05T18:37:50Z DEBUG IPA platform fedora                                                                                                                                                                                                                                                                               
2024-02-05T18:37:50Z DEBUG IPA os-release Fedora Linux 40 (Cloud Edition Prerelease)                                                                                                                                                                                                                                         
2024-02-05T18:37:50Z INFO Preparing restore from /var/lib/ipa/backup/ipa-data-2024-02-05-18-36-26 on server.ipa.test                                                                                                                                                                                                         
2024-02-05T18:37:50Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'                                                                                                                                                                                                                                 
2024-02-05T18:37:50Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'                                                                                                                                                                                                                                 
2024-02-05T18:37:50Z DEBUG importing all plugin modules in ipaserver.plugins...                                                                                                                                                                                                                                              
2024-02-05T18:37:50Z DEBUG importing plugin module ipaserver.plugins.aci                                                                                                                                                                                                                                                     
2024-02-05T18:37:50Z DEBUG importing plugin module ipaserver.plugins.automember                                                                                                                                                                                                                                              
2024-02-05T18:37:50Z DEBUG importing plugin module ipaserver.plugins.automount                                                                                                                                                                                                                                               
2024-02-05T18:37:50Z DEBUG importing plugin module ipaserver.plugins.baseldap                                                                                                                                                                                                                                                
2024-02-05T18:37:50Z DEBUG ipaserver.plugins.baseldap is not a valid plugin module                                                                                                                                                                                                                                           
2024-02-05T18:37:50Z DEBUG importing plugin module ipaserver.plugins.baseuser                                                                                                                                                                                                                                                
2024-02-05T18:37:50Z DEBUG importing plugin module ipaserver.plugins.batch                                                                                                                                                                                                                                                   
2024-02-05T18:37:50Z DEBUG importing plugin module ipaserver.plugins.ca                                                                                                                                                                                                                                                      
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.caacl                                                                                                                                                                                                                                                   
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.cert                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.certmap                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.certprofile                                                                                                                                                                                                                                             
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.config                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.delegation                                                                                                                                                                                                                                              
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.dns                                                                                                                                                                                                                                                     
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.dnsserver                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.dogtag                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.domainlevel                                                                                                                                                                                                                                             
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.group                                                                                                                                                                                                                                                   
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.hbac                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG ipaserver.plugins.hbac is not a valid plugin module                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.hbacrule                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.hbacsvc                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.hbacsvcgroup                                                                                                                                                                                                                                            
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.hbactest                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.host                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.hostgroup                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.idp                                                                                                                                                                                                                                                     
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.idrange                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.idviews                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.internal                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.join                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.krbtpolicy                                                                                                                                                                                                                                              
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.ldap2                                                                                                                                                                                                                                                   
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.location                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.migration                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.misc                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.netgroup                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.otp                                                                                                                                                                                                                                                     
2024-02-05T18:37:51Z DEBUG ipaserver.plugins.otp is not a valid plugin module                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.otpconfig                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.otptoken                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.passkeyconfig                                                                                                                                                                                                                                           
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.passwd                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.permission                                                                                                                                                                                                                                              
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.ping                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.pkinit                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.privilege                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.pwpolicy                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.rabase                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG ipaserver.plugins.rabase is not a valid plugin module   
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.radiusproxy                                                                                                                                                                                                                            15:04:55 [71/405]
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.realmdomains                                                                                                                                                                                                                                            
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.role                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.schema                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.selfservice                                                                                                                                                                                                                                             
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.selinuxusermap                                                                                                                                                                                                                                          
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.server                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.serverrole                                                                                                                                                                                                                                              
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.serverroles                                                                                                                                                                                                                                             
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.service                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.servicedelegation                                                                                                                                                                                                                                       
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.session                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.stageuser                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.subid                                                                                                                                                                                                                                                   
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.sudo                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG ipaserver.plugins.sudo is not a valid plugin module                                                                                                                                                                                                                                               
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.sudocmd                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.sudocmdgroup                                                                                                                                                                                                                                            
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.sudorule                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.topology                                                                                                                                                                                                                                                
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.trust                                                                                                                                                                                                                                                   
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.user                                                                                                                                                                                                                                                    
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.vault                                                                                                                                                                                                                                                   
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.virtual                                                                                                                                                                                                                                                 
2024-02-05T18:37:51Z DEBUG ipaserver.plugins.virtual is not a valid plugin module                                                                                                                                                                                                                                            
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.whoami                                                                                                                                                                                                                                                  
2024-02-05T18:37:51Z DEBUG importing plugin module ipaserver.plugins.xmlserver                                                                                                                                                                                                                                               
2024-02-05T18:37:53Z DEBUG Starting external process                                                                                                                                                                                                                                                                         
2024-02-05T18:37:53Z DEBUG args=['/bin/systemctl', 'is-active', 'dirsrv']                                                                                                                                                                                                                                   
2024-02-05T18:37:53Z DEBUG Process finished, return code=0                                                                                                    
2024-02-05T18:37:53Z DEBUG stdout=active                                                                                                                      
                                                                                                                                                              
2024-02-05T18:37:53Z DEBUG stderr=                                                                                                                            
2024-02-05T18:37:53Z DEBUG   File "/usr/lib/python3.12/site-packages/ipapython/admintool.py", line 180, in execute                                                                                                                                                                                                           
    return_value = self.run()                                                                                                                                 
                   ^^^^^^^^^^                                                                                                                                                                                                                                                                                                
  File "/usr/lib/python3.12/site-packages/ipaserver/install/ipa_restore.py", line 314, in run                                                                                                                                                                                                                                
    raise admintool.ScriptError(                                                                                                                              
                                                                                                                                                              
2024-02-05T18:37:53Z DEBUG The ipa-restore command failed, exception: ScriptError: Cannot restore a data backup into an empty system                                                                                                                                                                                         
2024-02-05T18:37:53Z ERROR Cannot restore a data backup into an empty system                                                                                                                                                                                                                                                 
2024-02-05T18:37:53Z ERROR The ipa-restore command failed. See /var/log/iparestore.log for more information                                                                                                                                                                                                                  
2024-02-05T20:03:04Z DEBUG Logging to /var/log/iparestore.log                                                                                                 
2024-02-05T20:03:04Z DEBUG ipa-restore was invoked with arguments ['ipa-data-2024-02-05-20-02-50'] and options: {'verbose': False, 'quiet': False, 'log_file': None, 'password': 'Secret123', 'gpg_keyring': None, 'data_only': True, 'online': True, 'instance': None, 'backend': None, 'no_logs': False, 'unattended': True
}                                                                                                                                                             
2024-02-05T20:03:04Z DEBUG IPA version 4.11.1-2.fc40                                                                                                          
2024-02-05T20:03:04Z DEBUG IPA platform fedora                                                                                                                
2024-02-05T20:03:04Z DEBUG IPA os-release Fedora Linux 40 (Cloud Edition Prerelease)                                                                                                                                                                                                                                         
2024-02-05T20:03:04Z INFO Preparing restore from /var/lib/ipa/backup/ipa-data-2024-02-05-20-02-50 on server.ipa.test                                                                                                                                                                                                         
2024-02-05T20:03:04Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'                                                                                                                                                                                                                                 
2024-02-05T20:03:04Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'                                                                                                                                                                                                                                 
2024-02-05T20:03:04Z DEBUG importing all plugin modules in ipaserver.plugins...                                                                               
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.aci                                                                                      
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.automember                                                                               
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.automount                                                                                
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.baseldap                                                                                 
2024-02-05T20:03:04Z DEBUG ipaserver.plugins.baseldap is not a valid plugin module                                                                                                                                                                                                                                           
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.baseuser                                                                                 
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.batch                                                                                                                                                                                                                                                   
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.ca                                                                                       
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.caacl                                                                                    
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.cert                                                                                     
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.certmap                                                                                  
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.certprofile                                                                                                                                                                                                                                             
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.config                                                                                   
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.delegation                                                                               
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.dns                                                                                                                                                                                                                                                     
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.dnsserver                                                                                
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.dogtag                                                                                   
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.domainlevel                                                                                                                                                                                                                                             
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.group                                                                                    
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.hbac      
2024-02-05T20:03:04Z DEBUG ipaserver.plugins.hbac is not a valid plugin module
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.hbacrule
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.hbacsvc
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.hbacsvcgroup
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.hbactest
2024-02-05T20:03:04Z DEBUG importing plugin module ipaserver.plugins.host
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.hostgroup
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.idp
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.idrange
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.idviews
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.internal
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.join
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.krbtpolicy
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.ldap2
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.location
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.migration
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.misc
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.netgroup
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.otp
2024-02-05T20:03:05Z DEBUG ipaserver.plugins.otp is not a valid plugin module
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.otpconfig
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.otptoken
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.passkeyconfig
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.passwd
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.permission
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.ping
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.pkinit
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.privilege
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.pwpolicy
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.rabase
2024-02-05T20:03:05Z DEBUG ipaserver.plugins.rabase is not a valid plugin module
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.radiusproxy
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.realmdomains
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.role
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.schema
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.selfservice
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.selinuxusermap
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.server
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.serverrole
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.serverroles
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.service
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.servicedelegation
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.session
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.stageuser
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.subid
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.sudo
2024-02-05T20:03:05Z DEBUG ipaserver.plugins.sudo is not a valid plugin module
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.sudocmd
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.sudocmdgroup
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.sudorule
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.topology
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.trust
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.user
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.vault
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.virtual
2024-02-05T20:03:05Z DEBUG ipaserver.plugins.virtual is not a valid plugin module
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.whoami
2024-02-05T20:03:05Z DEBUG importing plugin module ipaserver.plugins.xmlserver
2024-02-05T20:03:07Z DEBUG Starting external process
2024-02-05T20:03:07Z DEBUG args=['/bin/systemctl', 'is-active', 'dirsrv']
2024-02-05T20:03:07Z DEBUG Process finished, return code=0
2024-02-05T20:03:07Z DEBUG stdout=active

2024-02-05T20:03:07Z DEBUG stderr=
2024-02-05T20:03:07Z DEBUG   File "/usr/lib/python3.12/site-packages/ipapython/admintool.py", line 180, in execute
    return_value = self.run()
                   ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ipaserver/install/ipa_restore.py", line 314, in run
    raise admintool.ScriptError(

2024-02-05T20:03:07Z DEBUG The ipa-restore command failed, exception: ScriptError: Cannot restore a data backup into an empty system
2024-02-05T20:03:07Z ERROR Cannot restore a data backup into an empty system
2024-02-05T20:03:07Z ERROR The ipa-restore command failed. See /var/log/iparestore.log for more information
                                                       


These files were not touched

[root@server ~]# ls -l /var/lib/dirsrv/slapd-IPA-TEST/
total 0
drwxrwx---. 1 dirsrv dirsrv  0 Feb  5 20:02 bak
drwxrwx---. 1 dirsrv dirsrv 48 Feb  5 16:49 db
drwxrwx---. 1 dirsrv dirsrv  0 Feb  5 20:02 ldif
[root@server ~]# ls -l /var/lib/dirsrv/slapd-IPA-TEST/db/
total 3740
-rw-------. 1 dirsrv dirsrv 3821568 Feb  5 20:03 data.mdb
-rw-r--r--. 1 dirsrv dirsrv      76 Feb  5 16:49 INFO.mdb
-rw-------. 1 dirsrv dirsrv    8192 Feb  5 20:05 lock.mdb


Reproducible: Always

Comment 1 Rob Crittenden 2024-02-05 21:36:08 UTC
This is related to the DB backend replacement recently implemented by 389-ds. IPA is still looking for bdb backend files rather than mdb.

It is looking for:

/var/lib/dirsrv/slapd-EXAMPLE-TEST/db/userRoot
/var/lib/dirsrv/slapd-EXAMPLE-TEST/db/ipaca

but as pointed out instead there is:

/var/lib/dirsrv/slapd-EXAMPLE-TEST/db/data.mdb

For the same reason only the userRoot backend is being backed up.

Comment 3 Rob Crittenden 2024-02-07 16:17:52 UTC
Cloned to upstream https://pagure.io/freeipa/issue/9526

Comment 5 Rob Crittenden 2024-02-07 18:33:15 UTC
In a related issue, the IPA in rawhide right now doesn't properly do backups either. This was fixed upstream in https://pagure.io/freeipa/issue/9516 but hasn't been released yet.

commit 677d30806662856595289525ef529a77adbf2272

Comment 6 Rob Crittenden 2024-02-08 19:04:26 UTC
Fedora rawhide build containing the backup and candidate restore patches were built in https://koji.fedoraproject.org/koji/taskinfo?taskID=113168952


Note You need to log in before you can comment on or make changes to this bug.