Simple script to backup scripts


Recommended Posts

recently had to do a fresh install of unraid, and incidentally lost all my user scripts (as they're stored on flash). So, i wrote a simple script to backup user scripts to the array in my backups destination. flash path should be the same for everyone (unless you manually changed it), you'll just need to adjust destination path accordingly. Maybe somebody can find it useful.

 

#!/bin/bash
dir=/boot/config/plugins/user.scripts/scripts/

echo 'Copying Scripts'

rsync -avh $dir /your/backup/destination/path
chmod -R 777 /your/backup/destination/path

echo 'all good'

Cheers!

  • Thanks 4
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.