Saturday, April 19, 2025

OBS Studio: Configuration Batch File Backup and Restore Guide for Windows 10 and 11

 

OBS Studio Batch Files Win 10 and 11



OBS Configuration Backup and Restore Guide for Windows 10 and 11 via Batch File

Introduction

OBS Studio is a powerful tool for streaming and recording, but managing your profiles and scenes manually can be tricky. This guide provides a simple and reliable solution to back up and restore your OBS configuration files using batch scripts.


What These Batch Files Do

  1. Back Up:
    • Securely save the essential OBS folder (basic), which includes:
      • Profiles: Your streaming and recording settings.
      • Scenes: Layouts and configurations for streams and recordings.
  2. Restore:
    • Automatically restore the most recent backup with minimal effort.

Why These Batch Files Are Useful

  • Simple and Effective:
    • No need to dig through folders or manage files manually—this script does it for you.
  • Error-Free:
    • Handles paths with spaces and ensures proper restoration.
  • Optimized:
    • Automatically keeps only the last five backups to save space.

Backup Script

This script creates a compressed backup of your OBS profiles and scenes, saving it in a designated folder.

Code

@echo off
setlocal

REM Define the path to OBS configuration files
set OBS_CONFIG_PATH=%AppData%\obs-studio

REM Define the path for saving backups
set BACKUP_PATH=C:\OBS_Backups

REM Ensure the backup directory exists, create it if it doesn't
if not exist "%BACKUP_PATH%" mkdir "%BACKUP_PATH%"

REM Generate a unique backup filename with date and time
for /f "tokens=2 delims==" %%A in ('wmic os get localdatetime /value') do set datetime=%%A
set timestamp=%datetime:~0,4%-%datetime:~4,2%-%datetime:~6,2%_%datetime:~8,2%-%datetime:~10,2%-%datetime:~12,2%
set BACKUP_FILE=%BACKUP_PATH%\obs_config_backup_%timestamp%.7z

REM Automatically delete older backups, keeping only the 5 most recent ones
for /f "skip=4 delims=" %%A in ('dir "%BACKUP_PATH%\obs_config_backup_*.7z" /b /o-d') do del "%BACKUP_PATH%\%%A"

REM Use 7-Zip to back up the "basic" directory
"C:\Program Files\7-Zip\7z.exe" u "%BACKUP_FILE%" "%OBS_CONFIG_PATH%\basic\*" -r

REM Notify user of completion
echo Backup completed successfully! File saved to: %BACKUP_FILE%
pause

Restore Script

This script automatically restores the latest backup, ensuring your configurations are back in place with no fuss.

Code

@echo off
setlocal

REM Define the path to OBS configuration files
set OBS_CONFIG_PATH=%AppData%\obs-studio\basic
set BACKUP_PATH=C:\OBS_Backups

REM Ensure the backup directory exists
if not exist "%BACKUP_PATH%" (
    echo ERROR: Backup directory does not exist. Please create it and add backup files.
    pause
    exit /b
)

REM Locate the most recent backup file
for /f "delims=" %%i in ('dir /b /o-d "%BACKUP_PATH%\obs_config_backup_*.7z"') do (
    set "BACKUP_FILE=%BACKUP_PATH%\%%i"
    goto :restore
)

echo ERROR: No backup files found in "%BACKUP_PATH%".
pause
exit /b

:restore
REM Validate the backup file exists
if not exist "%BACKUP_FILE%" (
    echo ERROR: Backup file "%BACKUP_FILE%" not found. Cannot restore.
    pause
    exit /b
)

REM Extract the backup to the basic folder, overwriting existing files
"C:\Program Files\7-Zip\7z.exe" x "%BACKUP_FILE%" -o"%OBS_CONFIG_PATH%" -aoa

REM Notify user of completion
echo Restore completed successfully! Restored to: "%OBS_CONFIG_PATH%"
pause

Important Notice

During the restoration process, all existing files in the basic directory will be overwritten by the files from the backup. This behavior is intentional and ensures a complete restoration of your profiles and scenes.

This will not affect a new installation or a case where you are restoring to fix a corrupted scene collection or settings. In such scenarios, you’d want to restore your last good backup to regain a fully functional setup.


Creating and Running Batch Files: The Basics

Batch files allow you to automate tasks by executing a set of commands in sequence. Here's how to create and run them:

Step 1: Open Notepad

  1. Press Windows Key + R, type notepad, and press Enter.
  2. Alternatively, search for "Notepad" in the Start Menu.

Step 2: Add Your Commands

  1. Copy the backup or restore code from this guide.
  2. Paste it into Notepad.

Step 3: Save the File

  1. Click File > Save As.
  2. Choose where to save the file (e.g., Desktop).
  3. In the File Name field, type a name for your batch file (e.g., BackupScript.bat).
  4. Add .bat to the name to ensure it's recognized as a batch file.
  5. In Save as type, select All Files, then click Save.

Step 4: Run the Batch File

  1. Locate the saved .bat file.
  2. Double-click to run it.
  3. If required, right-click and select Run as administrator.



    Why Use 7-Zip?

    We recommend using 7-Zip as the compression tool for these scripts because it is:

    • Free and Open Source: 7-Zip is completely free to use, making it a cost-effective solution for anyone, regardless of budget.
    • Trustworthy and Reliable: It's a well-established tool that’s widely used and trusted by professionals and hobbyists alike.
    • Versatile and Feature-Rich: 7-Zip supports multiple compression formats and offers advanced functionality, such as:
      • Overwriting existing files to ensure a clean restoration.
      • Keeping backups organized efficiently.
      • Delivering excellent compression ratios for optimized storage.

    While these scripts use 7-Zip, feel free to adapt them to other tools like WinZip or WinRAR, depending on your personal preferences.



Tips for Success

  • Keep It Simple:
    • Stick to clear and concise file names and folder structures.
  • Test Before Use:
    • Run each script at least once to ensure it behaves as expected.
  • Organize Your Backups:
    • While C:\OBS_Backups is the recommended folder for simplicity, you can store your backups anywhere you prefer. Just make sure to update the drive letter or directory path in the batch scripts accordingly.

Thursday, April 10, 2025

Bare Pantry Beans and Rice Recipe


Bare Pantry Beans and Rice


Simple Red Beans and Rice



A simple, nutritious dish that adapts to whatever beans you have in your pantry, whether canned or dried.

Ingredients:

🍚 2 cups cooked white rice
🫘 2 cans (15.5 oz each) Kidney Beans or Dark Kidney Beans, undrained (Use the liquid from the cans—or see the dried bean alternative below)
🧈 1 tablespoon butter, olive oil, or vegetable oil
🌟 A few dashes of soy sauce (optional for added umami!)


Seasonings:

🧄 3 teaspoons garlic powder
🧅 2 teaspoons onion powder
🌶️ 1-2 teaspoons paprika (adjust for preference)
⚫ 1 teaspoon black pepper
🔥 Hot Sauce (e.g., Tabasco, optional, to taste)


Optional Add-Ins:

🍖 Meat Options:

  • 🐷 Ham hock (for a smoky flavor)
  • 🥓 Diced ham
  • 🌭 Sausage slices (e.g., smoked or Andouille sausage)

Bonus Customization:

🍴 Sauces or Seasonings You Have on Hand:

  • Fast food sauce packets (e.g., Arby’s Horsey Sauce, BBQ Sauce, Taco Bell Mild Sauce)
  • Grilled hamburger seasonings or spice blends
  • Ketchup, mustard, Worcestershire sauce (small amounts for flavor boosts)
  • Any leftover marinades, dips, or condiments

Alternative Beans for Flexibility:

Ranked by healthier sodium levels and what you’re likely to have on hand:
🥇 Dark Kidney Beans (10 mg sodium)
🥈 Pinto Beans (varies: 110–140 mg)
🥉 Black Beans (low-sodium options available)
🏅 Garbanzo Beans (varies by brand, great for a nutty twist)
🎖️ Red Beans (higher in sodium, approx. 350 mg per serving)


Instructions:

  1. Cook the rice: 🍚
    Prepare 2 cups of rice as directed. Stir in 1 tablespoon of butter or oil and optional soy sauce for extra richness.

  2. Prepare the beans: 🫘

    • If using canned beans: Combine both cans of kidney beans, including the liquid, in a microwave-safe dish. Add garlic powder, onion powder, paprika, black pepper, and a few dashes of Tabasco or other hot sauce. If adding meat, stir the cooked or reheated meat into the beans now. Heat in 3-minute intervals, stirring between each interval to evenly distribute heat and prevent overflowing. Total microwave time: 10-12 minutes.
    • If using dried beans: Soak 1 cup of dried beans (Kidney, Pinto, or Black Beans) overnight in water. Drain, rinse, and cook in fresh water until tender (about 1-2 hours stovetop or 25-30 minutes pressure cooker). Replace the canned liquid with 1 cup of diced tomatoes in tomato juice or low-sodium vegetable broth. Add seasonings as above and proceed with heating steps.
  3. Let the beans and meat rest: ⏳
    After heating, cover the dish and let the beans and meat sit for 20-30 minutes. This resting period allows the flavors to meld deeply into both the beans and the meat.

  4. Combine and serve: 🍛
    Use a slotted spoon to transfer the beans and meat into the rice, adding the liquid gradually until you reach your desired consistency. Mix gently, cover, and let rest for a few minutes to blend flavors before serving.

  5. Refrigerate for Best Results (Optional): 🛌
    Like a casserole, this dish benefits from resting overnight in the fridge. The flavors deepen, and the rice undergoes starch retrogradation, reducing its glycemic index and making it a healthier, well-rounded meal.


Keep It Simple: 🍴

The basics—rice, beans, and seasonings—are all you need for this dish. If you have extras, you can add meat (like ham or sausage) or experiment with other pantry staples, such as grill seasoning or fast-food sauces. But even in its simplest form, this Bare Pantry Recipe is delicious, filling, and incredibly easy to make.



Wednesday, April 2, 2025

Enduring Until Night: Carrying the Light - A Poem

Enduring Until Night: A Caregiver's Journey



Enduring Until Night: Carrying the Light


We rage against the dying of the light,

Sheltering against the darkness of the night.

We turn on the lights, more and more each day,

Yet each light, all of them, is finite.

The energy they need — and the energy we give —

Cannot, and should not, forever endure.


It cannot forever endure.

It should not forever endure.

For twilight comes to every day,

Slowly draining into dusk,

And leads us, gently, to its end.


We who remain go on to another day,

Another life, enduring once again —

Until it is time for our forever night.

Copyright April 2, 2025, M. W. Van Dyke
All Rights Reserved