YaST package manager: Purpose of the import and export function?

Hi all,

Happy New Year to everyone!

As I couldn’t find this documented anywhere I would like to briefly ask you guys here about the purpose of the import and export feature of the YaST package management module (yast2-packager).

I understand that the xml-file produced by the export function (File-Export) contains all packages currently installed and that this file being imported (File-Import) can be used to create a setup within the packager which reflects the system composition at the time of the export.

In other words, I could use the exported xml-file to duplicate or recover (in terms of packages installed) an existing system. Is that correct?

If this is so, I wonder why it doesn’t seem to be documented anywhere as an easy way for (a basic) system recovery very suitable at least for PC owners like myself (for whom the openSUSE disaster recovery process described here: https://en.opensuse.org/SDB:Disaster_Recovery, would certainly be a bit overblown). Or have I missed something?

I also wonder whether the export function can be scripted: Currently, I am using a ‘rpm -qa’ command to create an up-to-date installed package list each time I start my backup script. However, the resulting file has a format which is deviating from the file produced by the YaST packager export function and, thus, could not be directly used as an import source for the packager. Is there a YaST command line version of the export function that I could apply instead of ‘rpm -qa’ (or any other command that would create an xml file which can be readily imported into the YaST packager)?

Thank you very much for your responses and many regards,
Kallistos

I’ve never looked into this. But I think those features are there for support of AutoYast.

AutoYast: Automatic Linux Installation and Configuration with Yast2
I take that to be what you would use to deploy openSUSE or SuSE Enterprise across an entire business.

Yes, indeed, looks quite like that.

Couldn’t find anything specifically about the packager in the referenced document, though.

So, I still trying to figure out whether there might not be a purpose of the import-export-function for PC users…

That’s indeed what it’s for.

Hi guys,

Thanks a lot for your responses!

I understand the YaST packager export function has no real purpose for the PC owner to re-install software packages after a disaster stroke.

My own approach is now to run ‘rpm -qa --queryformat '%{NAME}
'
’ and with ‘zypper lr -pu’ prior to my regular backups to maintain a up-to-date list of both, installed packages and repositories which will give me enough information to easily get the old system back just in case anything goes really wrong…

Best regards,
Kallistos

@kallistos:

I suspect that, the actual openSUSE documentation for AutoYaST is here: <https://doc.opensuse.org/projects/autoyast/>.

  • The reference is at the bottom of the openSUSE Documentation page: <https://doc.opensuse.org/>.
  • The AutoYaST document dated “November 05, 2018” mentions the differences between Leap 42.3 and Leap 15.0 profiles …