Easiest way to backup .conf files

PaulMD

Verified User
Joined
Sep 18, 2016
Messages
16
At the moment I am changing a lot of my server configurations. I do it with vi but with vi I do not have recent backups of a single file. I have snapshots but I prefer a backup of the text of my .conf files (for easy and fast replacements if I did something wrong)

Is there an easy way to backup them? Normally I would backup those files to a local directory at my personal computer with FTP but those files I cannot access with FTP.
 
Hello,

Git is a good way to manage configs, you can even upload them into github or gitlab.

If you work with config under /etc you might want to try an etckeeper which is also based on git.
 
Git is a good way to manage configs, you can even upload them into github or gitlab.
That seems a good solution. Something to study about. At the moment probably a little bit too much for me.

Would rsync with a daily cronjob also be an option? Or is there another easier way.

With rsync I can copy/backup the files
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/extra/httpd-includes.conf
/etc/httpd/conf/extra/httpd-alias.conf
/etc/httpd/conf/extra/httpd-vhosts.conf
/usr/local/directadmin/data/users/admin/httpd.conf
/usr/local/directadmin/conf/directadmin.conf
/usr/local/directadmin/custombuild/options.conf
into 1 directory for example /mylocalbackups/conf/dayoftheweek/* (and rename one of the two httpd.conf files)
 
Back
Top