2026-07-14 11:51:45 -03:00
2026-07-14 11:51:45 -03:00
2026-07-14 11:51:45 -03:00
2026-07-14 11:51:45 -03:00
2026-07-14 11:51:45 -03:00

ROCKNIX Backup & Restore

Backup and restore script for ROCKNIX emulator configurations. Allows syncing optimal settings between multiple consoles via SSH.

Features

  • Specific backup: Full backup including all device/user-specific settings
  • Generic backup: Portable backup with device-specific settings filtered out
  • Selective restore: Choose which components to restore via interactive dialog
  • Safety backup: Automatically saves current settings before restoring
  • Device detection: Automatically identifies the target ROCKNIX device
  • SSH support: Password and key-based authentication

Requirements

# Fedora/RHEL
sudo dnf install tar dialog rsync sshpass

# Debian/Ubuntu
sudo apt install tar dialog rsync sshpass

Usage

Backup

# Specific backup (includes all settings)
./backup-rocknix.sh

# Generic backup (portable between devices)
./backup-rocknix.sh --type generic

# Custom host and output directory
./backup-rocknix.sh --host myconsole.local --output /path/to/backups

Restore

# Interactive restore (lists available backups)
./restore-rocknix.sh

# Restore specific backup file
./restore-rocknix.sh --backup backups/rocknix-config-specific-rg-cubexx-20260714-113010.tar.gz

# Restore all components without prompting
./restore-rocknix.sh --backup backup.tar.gz --all

Options

backup-rocknix.sh

Option Description Default
--host HOST Console hostname/IP rgcubexx.local
--user USER SSH username root
--password PASS SSH password (prompts)
--output DIR Backup output directory backups/
--type TYPE specific or generic specific
--help Show help

restore-rocknix.sh

Option Description Default
--host HOST Target console hostname/IP rgcubexx.local
--user USER SSH username root
--password PASS SSH password (prompts)
--backup FILE Backup file to restore (interactive)
--all Restore all components false
--help Show help

Components

The following components can be backed up and restored:

Component Description
retroarch-core-options RetroArch global core options
retroarch-opt Per-core .opt files
retroarch-rmp Button remaps .rmp files
retroarch-config Per-core overrides (config/)
shaders Shader packs and presets
ppsspp PPSSPP (PSP) settings
drastic DraStic (NDS) settings
other-emu Flycast, DuckStation, Yabasanshiro configs

Backup Types

Specific Backup

Includes all settings, including device-specific values like:

  • Screen resolution and scaling
  • Video/audio drivers
  • Input mappings
  • Account credentials (RetroAchievements, cloud sync)

Best for: Backing up the same device or identical hardware.

Generic Backup

Filters out device-specific settings for portability:

  • Screen dimensions (video_fullscreen_x/y)
  • Scale factors (menu_scale_factor)
  • Drivers (video_driver, audio_driver)
  • Credentials and tokens

Best for: Sharing configs between different devices or users.

Configuration

Edit config.sh to customize:

  • ROCKNIX_HOST: Default console hostname
  • ROCKNIX_STORAGE: Storage path on device (default: /storage)
  • BACKUP_DIR: Local backup directory
  • SPECIFIC_FILES: List of files to back up
  • GENERIC_EXCLUDES: Files excluded from generic backups
  • GENERIC_SETTINGS_FILTER: Settings patterns removed from generic backups

Examples

# First-time setup: create a specific backup
./backup-rocknix.sh --host rgcubexx.local

# Clone settings to another device of the same model
./backup-rocknix.sh --type generic
./restore-rocknix.sh --host rgcubexx2.local --backup backups/rocknix-config-generic-*.tar.gz

# List available backups
./restore-rocknix.sh  # Shows interactive menu

File Structure

rocknix-backup/
├── backup-rocknix.sh    # Backup script
├── restore-rocknix.sh   # Restore script
├── lib-common.sh        # Shared functions (SSH, rsync, logging)
├── config.sh            # Default configuration
├── backups/             # Backup files (*.tar.gz)
└── PRE-ANALISIS-ROCKNIX.md  # Technical analysis document

License

MIT

Description
Backup script for ROCKNIX configurations
Readme 40 KiB
Languages
Shell 100%