# Backup and Restore Scripts
This folder contains PowerShell scripts for repository backup and restore.
## Scripts
- `backup.ps1` — backs up the repository to a configurable folder.
- `restore.ps1` — restores files from a backup folder to the repository root or a custom destination.
## Default paths
- Default backup target: `D:\Backup\normordis-pdf`
- Default restore source: `D:\Backup\normordis-pdf`
## Usage
### Backup
```powershell
./scripts/backup.ps1
```
### Backup to a custom folder
```powershell
./scripts/backup.ps1 -TargetPath 'E:\Backups\normordis-pdf'
```
### Dry run
```powershell
./scripts/backup.ps1 -DryRun
```
### PowerShell WhatIf
```powershell
./scripts/backup.ps1 -WhatIf
```
### Restore from archive
```powershell
./scripts/restore.ps1 -SourcePath 'D:\Backup\normordis-pdf\normordis-pdf-backup-20240509-123000.tar.zip'
```
### Restore from folder
```powershell
./scripts/restore.ps1 -SourcePath 'D:\Backup\normordis-pdf' -DestinationPath 'C:\Projects\normordis-pdf'
```
### Restore dry run
```powershell
./scripts/restore.ps1 -DryRun
```