"Forking" a repository possible?

• The output of restic version.

restic 0.19.1 compiled with go1.26.4 on linux/amd64

• The complete commands that you ran (leading up to the problem or to reproduce the problem).

rclone sync remote:restic /media/backup/restic --verbose --progress

• Any environment variables relevant to those commands (including their values, of course).

none

• The complete output of those commands (except any repeated output when obvious it’s not needed for debugging).

I don’t need to debug, I have a question about repository management and no failed commands.

I have used restic to backup my data to a RAID array of two flash drives. That worked well until I ran out of storage and did not want to get rid of backups. I now have a new flash drive of ~256GB. I keep multiple copies of my restic repository copied/synced with rclone. Now that my ~128GB RAID array is full I would like to “fork” an existing copy of that repository into a new independent repo, where I can forget and prune my oldest snapshots and only keep most current ones. Is this possible currently without a full rewrite?

I don’t quite understand what you mean by “fork” if I’m honest.
You could copy the repository files (using rclone, cp, rsync, etc.), then you’d have a duplicate of your repository in a second location.
You could also init a new repository in a second location using --copy-chunker-params, and then run restic copy to copy the snapshots from source to target.
Both approaches give you a repository that is a duplicate of the original, yet can be used completely independently, assuming you don’t repeat the initial copy operation.

By this do you mean “can I copy only some snapshots?” to which the answer is yes, you can pass a list of snapshot IDs to copy to restic copy, and it’ll only copy those snapshots into the second repository.