• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

💾Software Tip: Automate backing up your MQ config files

Maybe someone finds this useful:

This is the Powershell script I use to backup my MQ config into a zip file. I use Windows Task Scheduler to run it once per week. My destination drive is cloud storage.
- Requires 7zip.
- Change your source and destination folders.
- Put the code in a new text file and save it as a .ps1 file
- Set up a scheduled task
- Make the action start a program (powershell.exe)
- Add this to the arguments: -ExecutionPolicy Bypass -NonInteractive -file "P:\Backups\Backup Next Config.ps1" (change the path to wherever you save the ps1 file.

Bash:
# ============================================================
#  Backup-Next-Config.ps1
#  Compresses the Next Config folder using 7-Zip
#  and saves it as YYYY-MM-DD-NextConfig.7z
# ============================================================

# --- Configuration -----------------------------------------------------------

$SourceFolder = "C:\Games\Next\config"
$BackupFolder = "P:\Backups\EQ"   # Change this to your preferred backup destination
$SevenZipPath = "C:\Program Files\7-Zip\7z.exe"               # Change if 7-Zip is installed elsewhere

# --- Validation --------------------------------------------------------------

if (-not (Test-Path $SevenZipPath)) {
    Write-Error "7-Zip not found at: $SevenZipPath`nPlease install 7-Zip or update the `$SevenZipPath variable."
    exit 1
}

if (-not (Test-Path $SourceFolder)) {
    Write-Error "Source folder not found: $SourceFolder"
    exit 1
}

# Create backup destination folder if it doesn't exist
if (-not (Test-Path $BackupFolder)) {
    New-Item -ItemType Directory -Path $BackupFolder | Out-Null
    Write-Host "Created backup folder: $BackupFolder"
}

# --- Build archive name and path ---------------------------------------------

$DateStamp  = Get-Date -Format "yyyy-MM-dd"
$ArchiveName = "$DateStamp-Next-Config.7z"
$ArchivePath = Join-Path $BackupFolder $ArchiveName

# --- Run 7-Zip ---------------------------------------------------------------

Write-Host "Starting backup..."
Write-Host "  Source : $SourceFolder"
Write-Host "  Archive: $ArchivePath"
Write-Host ""

& $SevenZipPath a -t7z -mx=5 "$ArchivePath" "$SourceFolder\*"

# --- Result ------------------------------------------------------------------

if ($LASTEXITCODE -eq 0) {
    $Size = (Get-Item $ArchivePath).Length / 1MB
    Write-Host ""
    Write-Host "Backup completed successfully!" -ForegroundColor Green
    Write-Host "  File : $ArchivePath"
    Write-Host ("  Size : {0:N2} MB" -f $Size)
} else {
    Write-Error "7-Zip exited with code $LASTEXITCODE. Backup may have failed."
    exit $LASTEXITCODE
}
 
Maybe someone finds this useful:

This is the Powershell script I use to backup my MQ config into a zip file. I use Windows Task Scheduler to run it once per week. My destination drive is cloud storage.
- Requires 7zip.
- Change your source and destination folders.
- Put the code in a new text file and save it as a .ps1 file
- Set up a scheduled task
- Make the action start a program (powershell.exe)
- Add this to the arguments: -ExecutionPolicy Bypass -NonInteractive -file "P:\Backups\Backup Next Config.ps1" (change the path to wherever you save the ps1 file.

Bash:
# ============================================================
#  Backup-Next-Config.ps1
#  Compresses the Next Config folder using 7-Zip
#  and saves it as YYYY-MM-DD-NextConfig.7z
# ============================================================

# --- Configuration -----------------------------------------------------------

$SourceFolder = "C:\Games\Next\config"
$BackupFolder = "P:\Backups\EQ"   # Change this to your preferred backup destination
$SevenZipPath = "C:\Program Files\7-Zip\7z.exe"               # Change if 7-Zip is installed elsewhere

# --- Validation --------------------------------------------------------------

if (-not (Test-Path $SevenZipPath)) {
    Write-Error "7-Zip not found at: $SevenZipPath`nPlease install 7-Zip or update the `$SevenZipPath variable."
    exit 1
}

if (-not (Test-Path $SourceFolder)) {
    Write-Error "Source folder not found: $SourceFolder"
    exit 1
}

# Create backup destination folder if it doesn't exist
if (-not (Test-Path $BackupFolder)) {
    New-Item -ItemType Directory -Path $BackupFolder | Out-Null
    Write-Host "Created backup folder: $BackupFolder"
}

# --- Build archive name and path ---------------------------------------------

$DateStamp  = Get-Date -Format "yyyy-MM-dd"
$ArchiveName = "$DateStamp-Next-Config.7z"
$ArchivePath = Join-Path $BackupFolder $ArchiveName

# --- Run 7-Zip ---------------------------------------------------------------

Write-Host "Starting backup..."
Write-Host "  Source : $SourceFolder"
Write-Host "  Archive: $ArchivePath"
Write-Host ""

& $SevenZipPath a -t7z -mx=5 "$ArchivePath" "$SourceFolder\*"

# --- Result ------------------------------------------------------------------

if ($LASTEXITCODE -eq 0) {
    $Size = (Get-Item $ArchivePath).Length / 1MB
    Write-Host ""
    Write-Host "Backup completed successfully!" -ForegroundColor Green
    Write-Host "  File : $ArchivePath"
    Write-Host ("  Size : {0:N2} MB" -f $Size)
} else {
    Write-Error "7-Zip exited with code $LASTEXITCODE. Backup may have failed."
    exit $LASTEXITCODE
}
nice! this looks handy

i'd suggest maybe having it skip the login.db-WAL and login.db-SHM
 
I just use Syncthing to sync all my configs to a master shared folder that all of my boxes sync to. Every change I make is instantly backed up and pushed to all of the boxes so I can log in any toon on any comp and have it be ready to go at any time.
 
I just use Syncthing to sync all my configs to a master shared folder that all of my boxes sync to. Every change I make is instantly backed up and pushed to all of the boxes so I can log in any toon on any comp and have it be ready to go at any time.
This is also my approach.
 
💾Software Tip: Automate backing up your MQ config files

Users who are viewing this thread

Back
Top
Cart