Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have read something on that in "Gnu/Linux Magazine France". The guy uses rsync from /etc to root/ then stores it via subversion, without creating a working copy.</p> <p>I'm gonna quote a little the magazine.</p> <p>Ok so, in the example, the server runs freeBSD and is "sparky", whereas the machine to be saved is under debian and is "replica". Create an user "replica".</p> <p>in /usr/local/etc/ssh/sshd_config add:</p> <pre><code>Match User replica X11Forwarding no AllowTcpForwarding no ForceCommand /usr/local/bin/svnserv -t -r /home/replica/svnrepo -tunnel-user=replica </code></pre> <p>Creating the repository </p> <p>sparky # svnadmin create /home/replica/svnrepo</p> <p>Fix rights:</p> <pre><code>sparky # chown -R replica:nogroup /home/replica sparky # chown -R o-rwx /home/replica sparky # chown -R g-rwx /home/replica </code></pre> <p>Client side:</p> <p>install subversion</p> <pre><code>replica # mkdir -p /root/scripts/svnrepo replica # rsync -av /etc /root/scripts/svnrepo export SVN_SSH ="ssh -i /root/.ssh/id_rsa" svn import -m "replica config files" /root/scripts/svnrepos svn+ssh://replica@sparky/home/replica/svnrepo </code></pre> <p>Now, our folder is not yet a working copy, so we have to make it. Can you create a .svn file? He can't :)</p> <pre><code>cd /root/scripts mv svnrepo svnrepo.old svn checkout svn+ssh://replica@sparky/home/replica/svnrepo </code></pre> <p>Now try to modify a file in etc, like hosts for instance.</p> <p>rsync again. You should only get the modified file, wich is /etc/hosts copied.</p> <p>now you can commit :</p> <pre><code>svn commit -m "backup 1" /root/scripts/svnrepo </code></pre> <p>There is one last thing. If you want a file to be taken by subversion, it must be added. So for instance, if you create a new file into /etc, it won't be saved by default.</p> <p>What's to be done?</p> <pre><code>svn status /root/scripts/svnrepo | grep -e '^!' | awk '{ print $2 }' | xargs -r svn delete svn status /root/scripts/svnrepo | grep -e '^?' | awk '{ print $2 }' | xargs -r svn add </code></pre> <p>Then, you have to make your own script.</p> <p>Hope this helps.</p> <p>(gtg, I'll edit later to set titles and so one if nobody does)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload