Moving a repo from local machine to remote
(1) By Dave Polaschek (davepolaschek) on 2025-04-01 15:50:08 [link] [source]
Hi, I have multiple fossil repos on three different machines at home. I'd like to move them all to a single server (so I only have one machine to back up). This machine is, imaginatively enough, called fossil.local I've looked at https://fossil-scm.org/forum/forumpost/4e51f8f957 and that seems like an awful lot of hoop-jumping to move a repo, but I also haven't found a simpler recipe anywhere online. But it's entirely possible my search-fu is not working well this morning. Are the steps in Rainer's post on that thread accurate? Are they both necessary and sufficient? Note that my server will likely be a temporary thing. Long-term, I'm planning to set up my repos on a VPS which will also be the lighthouse for my personal tail-net, but for now, simply having all my repos collected on a single machine is a good start. Thanks!
(2) By Richard Hipp (drh) on 2025-04-01 16:25:54 in reply to 1 [source]
I think you (and Rainer) are making this way too difficult. Something similar to the following should suffice:
scp myrepo.fossil remote:Fossils/myrepo.fossil
Then on each check-out that you have do something like:
fossil sync ssh://remote/Fossils/myrepo.fossil
At this point you have clones of your repository both on your local machine and on "remote". Whenever you make a new check-in (assuming you have not disabled auto-sync), that check-in is first written to the repository on your local machine, then gets replicated to "remote", thus automatically doing a backup.
For added redundancy, you can do "fossil remote add ... to name multiple remote repositories that are accessible by ssh or https, then set:
fossil setting autosync all
And then each check-in you make will be pushed to all of your remote repositories. I lease linux servers from places like Linode (now Akamia) or Digital Ocean and put copies of important repositories there, so that I then have automatic off-site backup. More than just off-site; in a different part of the world so that content will be preserved even if there is a regional disaster. A shared-CPU server with more than enough power and storage to host hundreds of Fossil repositories can be had for around $6/month.
(3) By Dave Polaschek (davepolaschek) on 2025-04-01 16:33:37 in reply to 2 [link] [source]
Thanks! I thought that the general philosophy of fossil (which is what attracted me) was such that it should be pretty easy. Glad I hadn't misread that.
And yes, that's exactly what I'm after. I'm planning to get a cheap-ish VPS for fossil backup in another part of the world. I was pretty sure that autosyncing to multiples was possible, but hadn't gotten quite that far just yet, so the autosync all setting is something I need to file away.
Thanks again!
(4) By matt w. (maphew) on 2025-04-02 22:27:24 in reply to 3 [link] [source]
I'm in the midst of the same exercise: migrating many local fossil repos to a remote server. So thanks for this thread. I now know the sync part is easier than I'd read and anticipated. I've chosen fly.io as my host. I'm most of the way there how to set it up and will share my recipe here when I'm more confident in it. Early indications are hosting will be nearly free since Fossil is so lightweight and capable.
(5) By anonymous on 2025-04-02 22:48:57 in reply to 4 [link] [source]
I'd be interested in your fly.io setup. I have thought of doing some fossil hosting there as well.
(8.1) By matt w. (maphew) on 2025-04-03 05:02:09 edited from 8.0 in reply to 5 [link] [source]
My fly.io setup posted in a new thread at https://fossil-scm.org/forum/forumpost/1e2c38c247
(6) By Richard Hipp (drh) on 2025-04-03 01:29:36 in reply to 4 [link] [source]
The principle developers of Fossil (Stephan Beal and I) are working to move the main Fossil website, which includes this Forum, and which also includes 16 other sites like sqlite.org and pikchr.org, onto a new fresh server. We've been working all day building a prototype on an Linode VPS running Alpine Linux, and it has gone quite well - much easier than Ubuntu.
A preliminary recipe for taking a fresh Alpine instance to a secure and fully capable development server running Fossil behind TLS and with email notification capabilities can be seen at
(7) By Andy Bradford (andybradford) on 2025-04-03 01:39:18 in reply to 6 [link] [source]
Just looking at the notes on the move, I'm glad someone still sees wisdom in such measures as: > the TTL can be increased to 24 hours after everything has been set up > and the system is stable. It seems all "modern" websites have to have a 60 second TTL and so as soon as there is a hiccup (which never happens with "cloud", right?), the site disappears. I think for many sites, a longer TTL is better than short as it allows DNS to cache. Of course, the down side is that if you ever do want to "move" your site you have to plan ahead, but what's wrong with that? Anyway, good luck with the move.