#NEWLINE# def backup( file_name , jail = None , chroot = None ) : #NEWLINE# #INDENT# "\n    Export installed packages into yaml+mtree file\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' pkg.backup /tmp/pkg\n\n    jail\n        Backup packages from the specified jail. Note that this will run the\n        command within the jail, and so the path to the backup file will be\n        relative to the root of the jail\n\n        CLI Example:\n\n        .. code-block:: bash\n\n            salt '*' pkg.backup /tmp/pkg jail=<jail name or id>\n\n    chroot\n        Backup packages from the specified chroot (ignored if ``jail`` is\n        specified). Note that this will run the command within the chroot, and\n        so the path to the backup file will be relative to the root of the\n        chroot.\n\n        CLI Example:\n\n        .. code-block:: bash\n\n            salt '*' pkg.backup /tmp/pkg chroot=/path/to/chroot\n    " #NEWLINE# ret = __salt__ [ 'cmd.run' ] ( ( _pkg ( jail , chroot ) + [ 'backup' , '-d' , file_name ] ) , output_loglevel = 'trace' , python_shell = False ) #NEWLINE# return ret . split ( '...' ) [ 1 ]