Automatically BackUp OBS Studio Settings on Fedora Linux (NAS or Local)

Disclaimer: Use at own risk!

This guide will help you automatically back up your OBS Studio settings once a week. You'll use a script that either saves your backup to:



This backup will:


What You'll Need


Step 1: Create a Folder to Store Your Script

Run this in your terminal:

mkdir -p ~/.local/bin

What this does:

We’ll place our OBS backup script there.


Step 2: Create the Backup Script Using KWrite

Run this to open a new script file in KWrite:

 kwrite ~/.local/bin/backup-obs.sh &

This opens KWrite and lets you write the script. The & just runs KWrite in the background so you can still use your terminal.


Step 3: Paste One of These Backup Scripts

Option A – If You Are Using a NAS

#!/bin/bash

# Destination folder on your NAS

BACKUP_DIR="/mnt/nas_media/OBS-Backup"

Option B – If You Are Using a Local Backup Folder

#!/bin/bash

# Destination folder on your local machine

BACKUP_DIR="$HOME/obs-backups"


Now paste the rest (for both versions):

# Create a timestamp like 2025-07-12_15-00-00

TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")

# Define the backup folder path using the timestamp

DEST="$BACKUP_DIR/obs-studio-backup-$TIMESTAMP"

# Make sure the destination folder exists

mkdir -p "$DEST"

# Copy your OBS configuration folder to the destination

cp -r "$HOME/.config/obs-studio" "$DEST"

# Delete backups older than 14 days

find "$BACKUP_DIR" -type d -mtime +14 -exec rm -rf {} \;

# Confirm in the terminal

echo "OBS backup created at $DEST"


`#!/bin/bash` - This tells Linux to run the script with the Bash shell.

`BACKUP_DIR=...` - This is where the backups will go — either to your NAS or a local folder.

`TIMESTAMP=...` - Creates a unique time-based label for each backup.

`DEST=...` - Sets the full path to the backup folder using the timestamp

`mkdir -p "$DEST"` - Creates the destination folder if it doesn’t exist yet.

`cp -r ...` - Copies the OBS settings folder into the backup folder.

`find ... -mtime +14 ...` - Deletes any backups older than 14 days.

`echo ...` - Prints a message showing where the backup was saved.


Step 4: Save and Make the Script Executable

In KWrite, click Save, then close the window.

Back in the terminal, run:

chmod +x ~/.local/bin/backup-obs.sh

What this does:

Step 5: Test the Script Manually

Make sure your NAS is mounted if you're using one:

ls /mnt/nas_media/OBS-Backup/

Then run the script:

~/.local/bin/backup-obs.sh

You should see a message like:

OBS backup created at /mnt/nas_media/OBS-Backup/obs-studio-backup-2025-07-12_15-00-00

Or, if using local:

OBS backup created at /home/yourname/obs-backups/obs-studio-backup-...

Step 6: Set Up Automatic Weekly Backups with systemd

Fedora uses systemd, which includes a built-in task scheduler that replaces older tools like cron.


Step 6.1: Create the Systemd User Directory

Run:

mkdir -p ~/.config/systemd/user

What this does:


Step 6.2: Create the systemd Service File

This tells Fedora what to run.

Run:

kwrite ~/.config/systemd/user/obs-backup.service &

Paste this:

[Unit]

Description=Backup OBS Studio Settings

[Service]

Type=oneshot

ExecStart=%h/.local/bin/backup-obs.sh

What this means:

Save and close.


Step 6.3: Create the Timer File

This tells Fedora when to run the service.

Run:

kwrite ~/.config/systemd/user/obs-backup.timer &

Paste this:

[Unit]

Description=Run OBS Backup Weekly

[Timer]

OnCalendar=weekly

Persistent=true

[Install]

WantedBy=timers.target

What this means:

Save and close.


Step 7: Enable the Timer

Now tell Fedora to start using the timer:

systemctl --user daemon-reload

systemctl --user enable --now obs-backup.timer

What this does:


Step 8: Check That It’s Working

List your active timers:

systemctl --user list-timers

You should see something like:

NEXT LEFT LAST UNIT ACTIVATES

Mon 2025-07-15 10:00:00 BST 5 days - obs-backup.timer obs-backup.service


You’re Done!

You now have a complete, automated backup system for your OBS Studio settings: