DSM Config backup via script

Synology doesn’t allow you to backup the DSM config in an automated way, besides via the Synology Account. This gets saved god knows who and is just “automated”, without any possibility to set a schedule. I don’t like this limited out of the box option, so here is a script i added to my CMS to push out to my Synos. Tested on DSM6 and DSM7 devices. In my case it uses a NFS Share, but should be easily adaptable to a CIFS share for example....

November 1, 2022 · Gabe

PGSQL Backup script for docker

Fetches all DBs running in the container. Define everything you need in the config section of the script.\ Allows you to define the date format. Allows you to define the days to keep backups. Allows you to define the user:group of the backups, in case you’re using a specific backup user. Sends you a discord notification once done. Setup and add a cron job, done. # bin/bash ################### ## Configuration ## ################### docker=postgres14 #container name of the PG databases admin=admin_user #admin user of PG bu_keep_days=7 #number of days to keep db_path=/PATH TO DB BACKUPS/ #path to save backups today=$(date +"%Y%m%d%H%M") #Date to name backups - YearMonthDayHourMinute user=user_id #for backup perms group=group_id #for backup perms disccolor=65280 #color of discord embed botname="PGSQL Backup" #Name that shows as bot name in Discord author_url=https://amoklauf....

June 23, 2023 · Gabe