October 22, 20241 yr I have a shell scripts to make a copy of the databases on a remote server. The script creates a server-side copy and then downloads the files using rsync. I would like to run this from cron on Unraid. But preferably from docker. What docker image can I use? Or do I need to create my docker image? What is the best way to do this in Unraid?
October 22, 20241 yr Community Expert Solution If you already have scripts you are happy with, download the User Scripts plugin from Community Apps. I use this to automate several of my backup and maintenance activities, with a custom cron schedule.
October 22, 20241 yr Author Thx. I think I would prefer in a docker, more isolated from the system, easier to disable during servicing, etc. But ok, I'll check it out. I see that I can paste a script, but in my case it is multiple files that are related (some call others). Should I make it so that I put these scripts somewhere in a pool, and here in the script field I put the path to call my main backup script?
October 22, 20241 yr Community Expert Some good information in the User Script support thread. Without knowing what you have built for your scripts, it is better that I allow you to look and find your way to what works best for you. User Scripts is really just a GUI front end to manage scripts, without needing to manually drop into CLI, and it also manages cron scheduling for you. Also, in the first post of the support thread is a link to another thread, where people have posted examples of scripts they have developed. This is also a good thread to browse, for ideas and examples.
October 24, 20241 yr Author It's almost right. Among other things, I create directories in the scripts, unfortunately these directories get either the root owner (which is understandable) or I don't know why some strange identifiers, outside the Unraid user system. This causes my NFS access to stop working, it just can't see these files. In the script I use the standard commands: LOCAL_BACKUPS_PATH_DB="$LOCAL_BACKUPS_ROOT/$DOMAIN/db" LOCAL_BACKUPS_PATH_FILES="$LOCAL_BACKUPS_ROOT/$DOMAIN/files" mkdir -p "$LOCAL_BACKUPS_PATH_DB" mkdir -p "$LOCAL_BACKUPS_PATH_FILES" Any idea what could be the cause? ---edit The cause was rsync, after adding the appropriate parameters the permissions are not changed. The copy basically works, now I will test the stability of this solution. Edited October 25, 20241 yr by jaclas additional info
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.