Skip to content

Script to automate Debian GNU/Linux config backup into a Git repo

License

Notifications You must be signed in to change notification settings

Stumie/backuplinuxcfgstogit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

backuplinuxcfgstogit

Script to automate Debian GNU/Linux config backup into a Git repo

Dependencies

Install dependencies (coreutils, rsync and git) before using this script, e. g. like this:

sudo apt-get update && sudo apt-get install -y coreutils rsync git

Usage like e. g.

./backuplinuxcfgstogit.sh ./example-file-list.txt gitusername [email protected] [email protected]:user/target-git-repository-from-user.git

Make it regular

You might want to create a regular cron job for the script to take action, e. g. a file like this:

root@machine:~# cat /etc/cron.weekly/trigger-backuplinuxcfgstogit
#!/bin/bash

eval "$(ssh-agent -s)"
ssh-add .ssh/github
./backuplinuxcfgstogit.sh ./example-file-list.txt gitusername [email protected] [email protected]:user/target-git-repository-from-user.git >> /tmp/backuplinuxcfgstogit.log

About

Script to automate Debian GNU/Linux config backup into a Git repo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages