home / skills / mkalhitti-cloud / universal-or-strategy / nt8-backup-manager

nt8-backup-manager skill

/.agent/skills/nt8-backup-manager

This skill backs up NinjaTrader 8 settings automatically, verifies active directory paths, and checks for OneDrive locking conflicts to protect data.

npx playbooks add skill mkalhitti-cloud/universal-or-strategy --skill nt8-backup-manager

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.3 KB
---
name: nt8-backup-manager
description: Manages NinjaTrader 8 local backups and ensures path stability after OneDrive removal.
---

# NT8 Backup Manager Skill

This skill provides a standardized way to back up NinjaTrader 8 settings and verify the local path configuration.

## Core Responsibilities
1. **Path Verification**: Ensure `C:\Users\Mohammed Khalid\Documents\NinjaTrader 8` is the active directory.
2. **Automated Backup**: Create timestamped backups of Templates, Workspaces, and Configuration files.
3. **OneDrive Check**: Verify that `OneDrive.exe` is not locking files in the NT8 directory.

## Usage

### Run Backup
Use the included PowerShell script to create a snapshot on the Desktop:
```powershell
powershell -File ".agent/skills/nt8-backup-manager/scripts/backup.ps1"
```

## Critical Locations
- **Local Data**: `C:\Users\Mohammed Khalid\Documents\NinjaTrader 8`
- **Backup Root**: `C:\Users\Mohammed Khalid\OneDrive\Desktop\WSGTA\NinjaTrader_Local_Backups`

## Troubleshooting
If NinjaTrader shows "Path not found" or "File in use":
1. Check Registry: `HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders` -> `Personal` should be local.
2. Kill OneDrive: `taskkill /F /IM OneDrive.exe /T`
3. Clear Recovery: Remove `bin\Custom\Recovery` if compilation fails.

Overview

This skill manages NinjaTrader 8 local backups and enforces a stable local data path when OneDrive interferes. It automates timestamped snapshots of Templates, Workspaces, and configuration files and includes checks to ensure the NinjaTrader Documents folder points to a local directory. The goal is reliable recoverability and to avoid 'Path not found' or 'File in use' errors caused by cloud syncing.

How this skill works

The skill verifies the active NinjaTrader folder and confirms the Windows user shell 'Personal' folder is set to the local Documents path. It runs a PowerShell backup routine that copies Templates, Workspaces, and configuration files to a timestamped folder on the Desktop. The skill also checks for OneDrive.exe processes and can suggest terminating them to release file locks. Recovery and compilation issues are mitigated by clearing the custom Recovery folder when required.

When to use it

  • Before updating or deploying new strategies to ensure a safe rollback point.
  • When NinjaTrader reports 'Path not found' after OneDrive changes or profile moves.
  • If compilation fails due to locked files or lingering Recovery artifacts.
  • Regular scheduled protection of Templates, Workspaces, and configuration files.
  • After migrating a user profile off OneDrive to confirm local path stability.

Best practices

  • Run the included PowerShell backup before any major configuration change.
  • Confirm HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders -> Personal points to a local Documents path.
  • Keep backups on a local Desktop folder separate from OneDrive to avoid re-sync locks.
  • Terminate OneDrive.exe if it is locking NinjaTrader files before performing restores.
  • Remove bin\Custom\Recovery contents only when safe and after backing up recovery data.

Example use cases

  • Automated nightly snapshot of NinjaTrader Templates and Workspaces to a Desktop archive.
  • Pre-deployment backup before installing new indicators or strategies in production.
  • Troubleshooting session where OneDrive prevented NinjaTrader from accessing local config files.
  • Recovery after a corrupt workspace by restoring the most recent timestamped backup.

FAQ

How do I run the backup?

Execute the provided PowerShell script to create a timestamped snapshot on the Desktop.

What if OneDrive is locking files?

Terminate OneDrive.exe to release locks, confirm the Documents path is local, then rerun the backup or restore.