sown / tasks

Tasks for sown projects
0 stars 0 forks source link

migrate icinga 1 configuration to git #78

Closed TimStallard closed 2 years ago

TimStallard commented 2 years ago

The old icinga 1 configuration on monitor is currently in SVN. It seems like we'll still be running this for a while, and keeping track of changes while moving to icinga2 would be useful anyway, so I think it would be worth moving this to git?

I'm pretty sure there are secrets in this repo, so I suggest we just keep it local to this machine for now rather than pushing to GitHub.

TimStallard commented 2 years ago

so I think a conversion would be something like:

echo "root = root <root@sown-monitor>" > /root/authors
git svn --no-metadata -A /root/authors clone file:///srv/subversion/icinga /root/icinga-git

then in the old checkout we could do:

git init
git remote add origin /root/icinga-git
git fetch
git reset origin/master
git remote remove origin

which should leave us with a new git repo, without touching the files, and carrying over the old history - after that we can wipe out the .svn directory and treat it as just a git repo

TimStallard commented 2 years ago

Now done, note that it turns out /usr/local/icinga was actually a subdirectory in the svn repo, so I only converted that directory. I moved /usr/local/icinga/.svn over to /root/icinga-old-dot-svn.