Auto-backup latest operation log & changes without using bookmarks #8043
chris13524
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use Git remote/bookmarks, but still there's plenty of situations where I have local changes I haven't pushed up or created a bookmark for yet. This could last a few weeks as I develop a feature or fix alongside a lot of other ones. It's possible that I loose my laptop, it gets stolen, or company policy requires a factory reset. While best practice is always to push up changes and not trust the local machine, I can't help but wonder if there's an easy way to auto-backup the entire repo for me to save the anxiety.
I'm not that familiar with
jj's internals, but I've usedjjfor a few months now and it's super awesome. I figure since the operation log should in-theory point to the heads of all changes/bookmarks, I wonder if the op log could be directly and recursively backed up to some server w/o needing to backup the "rendered" files themselves.Similar idea here for syncing across machines, but in my case I don't care about bi-directionality. It can just force-push to the backup.
Curious if there's an easy way to achieve what I want with like a bash script or something? I know I could use rsync, but this would include lots of big build artifacts and could depend on specific repo setup. I'd have to configure rsync to use my
.gitignoreor something. Or maybe I just rsync the.jj/directory? (Not sure if there are symlinks etc) There's also multiple working trees and backing up all of them would be redundant (I just need the sharedjjhistory). It would be nice to have a universal strategy to simply push thejjop log/changes directly to a remote machine (doesn't have to be Git-based) and then clone them back later if I need to restore. I'd just have to setup a cron job and list the directories I'm interested in backing up.If not possible now, I think this would be a great feature to have in-general for a VCS... the ability to auto-backup the developer's local repo w/o worrying about bookmarks, files, gitignores, etc. Everything needed for the backup, jj is already aware of.
More details:
jj git cloneto clone from the backup (over SSH) only clones the bookmarks. It doesn't pull unnamed changes.Beta Was this translation helpful? Give feedback.
All reactions