Skip to content

a docker container specifically to backup your nas4free config to a git repo.

License

Notifications You must be signed in to change notification settings

liskl/nas4free-cfgbackup-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description: Ever needed to make sure you had a working copy with SVN backups of your nas4free installation? look no further. the following tool can be installed in minutes and allows you to enable a ongoing backup within a minute of the change occuring.

uses git curl and cron to:
	Login to the nas4free bot at $SAN_HOST using $SAN_USER and $SAN_PASSWD environment variables;
	download the current config.xml using the same functions of the web interface
	then after doing a git pull from $CONFIG_REPO_URI

NOTE: uses /root/.netrc for git credentials. [needs to be created]
[root@trance nas4free-cfgbackup]# cat ./cfg-files/root/.netrc
machine stash.example.com
login backup-service-account
password thisisasecretpassword

Use:

DEFINE Environment Variables

SAN_HOST="nas4free.example.com"
SAN_USER="EXAMPLE_USER"
SAN_PASSWD="EXAMPLE_PASSWORD"
CONFIG_REPO_URI='https://stash.example.com/scm/lcs/config_backup.git'
GIT_USER_EMAIL='nas4free-cfgbak-cron-service@nas4free.example.com'
GIT_USER_NAME='nas4free-config-backup-service'

Installation:

create a .netrc at ./cfg-files/root/.netrc containing:

    machine stash.example.com
    login backup-service-account
    password thisisasecretpassword

then build and deploy from ./

docker build -t liskl/nas4free-cfgbak \
 --build-arg=CONFIG_REPO_URI='https://stash.example.com/scm/lcs/config_backup.git' \
 --build-arg=GIT_USER_EMAIL='nas4free-cfgbak-cron-srv@nas4free.example.com' \
 --build-arg=GIT_USER_NAME='nas4free-config-backup-service' \
 ./;
                               
docker run -d \
 -e SAN_HOST='nas4free.example.com' \
 -e SAN_USER='EXAMPLE_USER' \
 -e SAN_PASSWD='EXAMPLE_PASSWORD' \
     liskl/nas4free-cfgbak;

About

a docker container specifically to backup your nas4free config to a git repo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages