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:
A NAS mounted at /mnt/nas_media/OBS-Backup/, or
A local folder in your home directory, like ~/obs-backups/
This backup will:
Keep your OBS settings safe
Automatically delete old backups after 14 days
Use Fedora’s built-in systemd timers (a modern replacement for cron)
What You'll Need
Fedora Linux (Not sure how this will work on other distros)
OBS Studio installed
Terminal and KWrite (text editor)
Optional: A mounted NAS at /mnt/nas_media/OBS-Backup/
Step 1: Create a Folder to Store Your Script
Run this in your terminal:
mkdir -p ~/.local/bin
What this does:
mkdir means “make directory” — it creates a folder.
-p means “create all folders in the path, if they don’t exist.”
~/.local/bin is a safe location in your home folder for personal scripts.
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:
chmod changes file permissions.
+x means “make this file executable” — so you can run it like a program.
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:
~/.config/systemd/user is where you store systemd service and timer files just for your user account.
mkdir -p ensures the folder exists.
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:
[Unit] sets a description.
[Service] defines how the job works.
Type=oneshot means this runs once and exits.
%h means “your home folder.”
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:
[Unit] sets a description.
OnCalendar=weekly means “run once every week.”
Persistent=true means it will catch up if your computer was off during the scheduled time.
WantedBy=timers.target makes sure the timer runs with the system.
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:
daemon-reload refreshes systemd so it sees your new files.
enable makes the timer start automatically after reboot.
--now starts it immediately.
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:
Backs up to NAS or local
Runs weekly
Deletes old backups after 14 days
Fully controlled by you