.. _Backup and Restore a Library:

Backup and Restore a Library
###################################

.. tags:: educator, how-to

.. contents::
  :local:
  :depth: 1

You can :ref:`backup<Backup a Library>` and :ref:`restore<Restore a Library>` a
content library in Studio.

.. _Backup a Library:

Backup A Library To Local Archive
*********************************

There are several reasons why you might want to backup your library.

* To save your work in progress
* To edit the XML in your library directly
* To create a backup copy of your library
* To share with another course team member

When you backup your library, Studio creates a **.zip** file for export. This
export file contains the problems in the library, including any customizations
you made in the library to problem settings. The export does not include library
settings such as user access permissions.

To backport a library, follow these steps.

#. In Studio, select the **Libraries** tab.

#. Locate the library that you want to backup.

#. From the **Tools** menu, select **Backup to local archive**.

   ..  image:: /_images/educator_how_tos/library_backup_1.png
   	:alt: A screenshot of the Library Tools menu, with the first option being "Backup to local archive"

#. Select **Download Library Backup** next to your library's name to dowload the archive.

   ..  image:: /_images/educator_how_tos/library_backup_2.png
   	:alt: A screenshot of the Library Backup page, with the library name to the left of a button that reads "Download Library Backup"

When the export process finishes, you can access the ``.zip`` file on your
computer.

.. _Restore a Library:

Create a Library From An Archive
********************************

.. note::

   For the Ulmo release, Create Library From Archive is only supported as a way to initialize a new library.

The  library file that you import must be a ``.zip`` file that contains a
``package.toml`` file.

To create a library from an archive, follow these steps.

#. In Studio, select the **+ New library** button in the top right.

   ..  image:: /_images/educator_how_tos/new_library_button.png
   	:alt: The "+New Library" button appears in the top right corner of the Studio homepage

#. Select **Create from archive** button in the top right.

   ..  image:: /_images/educator_how_tos/create_library_from_archive.png
   	:alt: The "Create from archive" button appears in the top right corner of the "Create new library" page

#. Drag and drop the file, or click to upload, your ``.zip`` file.

#. After your file is uploaded, you'll see information about the imported
   library at the top of the screen:

   ..  image:: /_images/educator_how_tos/library_import_screen.png
       :alt: The "Create library" page with information about the uploaded library

#. Enter in the name, organization, and Library ID for the library.

#. When the import process finishes, you'll be taken to your new library.

.. seealso::
 
    :ref:`Navigate the Library Homepage`

    :ref:`Create and edit content in a Library`

    :ref:`Create and edit units in a Library`

    :ref:`Build a Collection in a Library`

    :ref:`Migrating Legacy Libraries`

    :ref:`Publish Library content`

    :ref:`Add and Delete tags in Library content`

    :ref:`Add a Problem Bank to your course for randomization`

    :ref:`Add users to Libraries`

**Maintenance chart**

+--------------+-------------------------------+----------------+---------------------------------------------------------------+
| Review Date  | Working Group Reviewer        |   Release      |Test situation                                                 |
+--------------+-------------------------------+----------------+---------------------------------------------------------------+
| 2025-12-01   | Sarina                        | Ulmo           | Pass                                                          |
+--------------+-------------------------------+----------------+---------------------------------------------------------------+