> ## Documentation Index
> Fetch the complete documentation index at: https://orphelix.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# orphelix restore

> Restore database from backup

# orphelix restore

Restore Orphelix database from a backup file.

## Usage

```bash theme={null}
orphelix restore [backup-path]
```

## List Available Backups

Run without arguments to see available backups:

```bash theme={null}
$ orphelix restore

📦 Available backups:

1. orphelix-backup-2025-11-26-103045.db
   Created: 11/26/2025, 10:30:45 AM
   Size: 2.43 MB

2. orphelix-backup-2025-11-25-150000.db
   Created: 11/25/2025, 3:00:00 PM
   Size: 2.38 MB

3. orphelix-backup-2025-11-24-090000.db
   Created: 11/24/2025, 9:00:00 AM
   Size: 2.35 MB

💡 Use: orphelix restore <path-to-backup>
```

## Restore from Backup

```bash theme={null}
$ orphelix restore ~/orphelix-backups/orphelix-backup-2025-11-26-103045.db

🔄 Restoring from backup...

   Backup: ~/orphelix-backups/orphelix-backup-2025-11-26-103045.db
   Size: 2.43 MB
   Created: 11/26/2025, 10:30:45 AM

⚠️  This will overwrite your current database!

   Continue? [y/N]: y

💾 Creating safety backup of current database...
✅ Safety backup: ~/orphelix-backups/orphelix-backup-pre-restore-20251126.db

🔄 Restoring database...
✅ Database restored successfully!

   Restart Orphelix to apply changes: orphelix restart
```

## Safety Features

> [!WARNING]
>
> Before restoring, the current database is automatically backed up as a safety measure.

Safety backup naming:

```
orphelix-backup-pre-restore-{timestamp}.db
```

## Confirmation Prompt

You must confirm the restore operation by typing `y` or `yes`.

Cancel by typing `n` or `N`:

```bash theme={null}
Continue? [y/N]: n
⏭️  Restore cancelled
```

## After Restore

**Restart the application** to load restored settings:

```bash theme={null}
orphelix restart
```

Changes take effect after restart.

## What Gets Restored

All database tables are restored:

* User settings and preferences
* GitHub integration configuration
* Cluster aliases
* Critical issues monitoring config
* Sidebar customization
* Historical metrics (if applicable)

## Troubleshooting

### Backup File Not Found

```bash theme={null}
Error: Backup file not found: /path/to/backup.db
```

Check the path and ensure file exists:

```bash theme={null}
ls ~/orphelix-backups/
```

### Corrupted Backup

```bash theme={null}
Error: Backup file is corrupted or invalid
```

Try an older backup or contact support.

### Permission Denied

```bash theme={null}
Error: Permission denied
```

Ensure you have read permissions:

```bash theme={null}
chmod 644 ~/orphelix-backups/orphelix-backup-*.db
```

## Related Commands

* [backup](https://orphelix.mintlify.site/cli/commands/backup.md) - Create new backup
* [export-config](https://orphelix.mintlify.site/cli/commands/export-config) - Export as JSON
* [restart](https://orphelix.mintlify.site/cli/commands/restart.md) - Restart application

## See Also

> [card] [Backup Command](https://orphelix.mintlify.site/cli/commands/backup.md)
>
> Create database backups


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.