> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-admin/9.3-administer/manage-the-pentaho-system/manage-the-pentaho-repository/backup-and-restore-pentaho-repositories.md).

# Backup and restore Pentaho repositories

A complete backup and restore of your Pentaho repositories can be done through either the command (cmd) window or with the `File Resource` service in the Pentaho Rest APIs.

**Note:** If you are on Pentaho version 8.0 or earlier, as a best practice to avoid errors when exporting and importing repository contents, select specific content and not the entire repository. For more information, see [Importing and exporting PDI content with Pentaho 8.0 and earlier](/pdia-admin/9.3-administer/troubleshooting-overview-cp/pentaho-repository-issues/importing-and-exporting-8.0-and-earlier.md).

The backup process exports all content from the Pentaho Repository and creates a ZIP file, which includes:

* Users and roles
* All files (dashboards, reports, etc.)
* Schedules
* Data connections
* Mondrian schemas
* Metadata entries
* A manifest file

All of your content is pulled from this ZIP file when you restore the Pentaho Repository.

You must have appropriate administrator permissions on the server in order to perform a repository backup or restore.

## Step 1: Backup the Pentaho Repository

Backing up your Pentaho Repository is done through the use of command line arguments. There are some example arguments below that you can customize for your particular server.

If an argument is required for successful backup and has not been provided, the missing requirement is displayed in the cmd window. Backup results are also displayed in the window.

1. Open a cmd window and point the directory to the install location of your running Pentaho Server.
2. Use the `import-export` script with your arguments for backing up the repository.
3. Press Enter.

For example,

* **Windows**

  `import-export.bat --backup --url=http://localhost:8080/pentaho --username=admin --password=password --file-path=c:/home/Downloads/backup.zip --logfile=c:/temp/logfile.log`
* **Linux**

  `./import-export.sh --backup --url=http://localhost:8080/pentaho --username=admin --password=password --file-path=/home/Downloads/backup.zip --logfile=/temp/logfile.log`

## Step 2: Restore the Pentaho Repository

Restoring your Pentaho Repository is also done through the use of command line arguments. The process for restoring both repositories is similar to the backup process, except for the differences shown in the examples below. These examples can be customized for your particular server.

If an argument is required for successful restore and has not been provided, the missing requirement is displayed in the cmd window. Restore results are also displayed in the window.

1. Open a cmd window and point the directory to the install location of your running Pentaho Server.
2. Use the `import-export` script with your arguments for backing up the repository.
3. Press Enter.

For example,

* **Windows**

  `import-export.bat --restore --url=http://localhost:8080/pentaho --username=admin --password=password --file-path=c:/home/Downloads/backup.zip --overwrite=true --logfile=c:/temp/logfile.log`
* **Linux**

  `./import-export.sh --restore --url=http://localhost:8080/pentaho --username=admin --password=password --file-path=/home/Downloads/backup.zip --overwrite=true --logfile=/temp/logfile.log`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pdia-admin/9.3-administer/manage-the-pentaho-system/manage-the-pentaho-repository/backup-and-restore-pentaho-repositories.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
