Editing
Versiebeheer van configuraties met Subversion
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Geversioneerd beheer van configuraties = == Aanmaken configuratie directory voor server == Voeruit vanf een werksation: svn --username=martin --password=xxxxxx import /home/martin/dummy \ https://configurations.webhuis.nl/configurations/Webhuis.nl/syslog-ng/ -m "initial import syslog-ng" Vervolgens op de server: # apt-get update && apt-get install subversion == script voor dagelijkse backup == Voer onderstaand script op de server eenmalig uit met: # /usr/local/bin/configurations <naamhost> <domein> <usersvn> <passsvn> <pre> #!/bin/bash # # Copyright (C) 2008 Martin Simons, Webhuis. Renkum The Netherlands # # This source code is licensed under the GNU General Public License, # Version 2. See the file http://webhuis.nl/GPL-license for more details. # # Dagelijkse backup van de configuratie van de host naar subversion naamhost=${1} domein=${2} usersvn=${3} passsvn=${4} mkdir /var/backups/${naamhost} /usr/bin/svn checkout https://configurations.webhuis.nl/configurations/${domein}/${naamhost} \ /var/backups/${naamhost} --username=${usersvn} --password=${passsvn} cat <<eof_configuration > /usr/local/bin/${naamhost}-configuration.sh #!/bin/bash # # Copyright (C) 2008 Martin Simons, Webhuis. Renkum The Netherlands # # This source code is licensed under the GNU General Public License, # Version 2. See the file http://webhuis.nl/GPL-license for more details. # # Script voor aanmaken Samba Home directory datum=\`date +%Y%m%d\` cp -ur /etc /var/backups/${naamhost}/ rm /var/backups/${naamhost}/etc/group* rm /var/backups/${naamhost}/etc/gshadow rm /var/backups/${naamhost}/etc/gshadow- rm /var/backups/${naamhost}/etc/ldap.secret rm /var/backups/${naamhost}/etc/libnss-ldap.secret rm /var/backups/${naamhost}/etc/pam_ldap.secret rm /var/backups/${naamhost}/etc/passwd* rm /var/backups/${naamhost}/etc/shadow rm /var/backups/${naamhost}/etc/shadow- cd /var/backups/${naamhost} /usr/bin/svn add * -q --force /usr/bin/svn commit -m "${naamhost} \$datum" cd - eof_configuration chmod +x /usr/local/bin/${naamhost}-configuration.sh echo "zet in crontab met crontab -e " "15 3 * * * /usr/local/bin/"${naamhost}"-configuration.sh"<hr/> </pre> Bewaar de laatste regel vanaf 15 3 in crontab, zet het onderaan tenzij je weet wat je doet. <hr/> Terug naar: [[Webhuis Support Infrastructuur]]
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information