# Moving fossils Last weekend I moved my fossil repositories from the VPS to the RPi. It was not even very difficult, I only ran into one issue that turned out to be a non-issue. Paying attention to what you are doing certainly helps... First I copied all the fossil files from the /srv/museum directory (fossils belong in museums) to my home laptop as a backup. Then copied them to the Pi. On the VPS fossil is running as a systemd user service behind nginx on Debian. The Pi runs NetBSD and apache. I wanted to try another method so let's give good old cgi a chance. As the web page of fossil states it is self-host friendly, so setting it up was fairly easy. Notes for myself: First enable the cgi module in apache uncommenting the following line in httpd.conf: `LoadModule cgid_module lib/httpd/mod_cgid.so` Then set the directory containing the cgi script: `ScriptAlias /cb/ "/usr/pkg/libexec/cb/"` Don't forget the Directory settings for this script dir. Test and restart apache: ``` apachectl -t apachectl restart ``` In the cgi script directory create the following script named `museum`: ``` #!/usr/pkg/bin/fossil directory: /path/to/the/museum/ repolist ``` Copy the repositories to the specified dir and that's it. Looking at my.pi.eu/cb/museum presents the list of repositories on the Pi. So far so good, let's change the remote of an existing clone to point to the new server. In the checkout dir do the following: ``` fossil remote add newsrv https://user@my.pi.eu/cb/museum/repo-name fossil remote newsrv ``` The latter replaces the default url with the one configured as newsrv. Do not forget to specify the user in the url - already made that mistake - otherwise fossil cannot connect to the remote repo. --- I like to use fossil even at work where it is installed under Windows and also in Ubuntu running in WSL. As the repo is a single file configuring a remote repo stored in OneDrive is easy. And OneDrive does not freak out as it does with the plethora of files git is creating. Why is this even a thing? When I have just some small scripts or ideas that I do not want to store in the work GitLab, I just back them up in OneDrive using fossil.