{"id":20532338,"url":"https://github.com/nozzlegear/fs-couchdump","last_synced_at":"2026-04-17T22:31:30.341Z","repository":{"id":72734879,"uuid":"107882768","full_name":"nozzlegear/fs-couchdump","owner":"nozzlegear","description":"An F# script that wraps couchdb-backup.sh to dump all databases in a CouchDB instance, because couchdb-backup.sh only dumps one database at a time.","archived":false,"fork":false,"pushed_at":"2018-01-14T18:53:33.000Z","size":92,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T02:48:42.475Z","etag":null,"topics":["couchdb","dotnet","fsharp"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nozzlegear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-22T16:25:21.000Z","updated_at":"2017-10-22T17:33:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a8ce129-e7e6-4414-abab-e284e530d143","html_url":"https://github.com/nozzlegear/fs-couchdump","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nozzlegear/fs-couchdump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozzlegear%2Ffs-couchdump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozzlegear%2Ffs-couchdump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozzlegear%2Ffs-couchdump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozzlegear%2Ffs-couchdump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nozzlegear","download_url":"https://codeload.github.com/nozzlegear/fs-couchdump/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozzlegear%2Ffs-couchdump/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31948387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["couchdb","dotnet","fsharp"],"created_at":"2024-11-16T00:14:22.531Z","updated_at":"2026-04-17T22:31:30.325Z","avatar_url":"https://github.com/nozzlegear.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fs-couchdump\nAn F# script that wraps [couchdb-backup.sh](https://github.com/danielebailo/couchdb-dump) to dump all databases in a CouchDB instance, whereas couchdb-backup.sh only dumps one database at a time. It does *not* currently supported authentication or URLs that aren't `localhost:5984`, but such support should be trivial and I'm more than happy to accept a pull request.\n\n(**Windows users: This script must be run from WSL.**)\n\n# Setup instructions\n\n1. Install Mono: `sudo apt install mono-complete`\n2. **Clone this repository to /etc/fs-couchdump**: `git clone https://github.com/nozzlegear/fs-couchdump /etc/fs-couchdmp`\n3. Make `run.sh` executable: `sudo chmod u+x run.sh`\n4. Make paket.bootstrapper.exe executable: `sudo chmod u+x .paket/paket.bootstrapper.exe`\n5. Bootstrap paket: `mono .paket/paket.bootstrapper.exe`\n6. If you're using the upload feature:\n    1. [Follow these instructions to install tarsnap](https://www.tarsnap.com/pkg-deb.html).\n    2. Copy your tarsnap key (preferably a write-only key) to the target machine.\n    3. Make sure the tarsnap config file at `/etc/tarsnap.conf` is pointing to your keyfile.\n    4. Symlink `cron/backup-couchdb` to the cron folder: `ln -s \"$PWD/cron/backup-couchdb\" \"/etc/cron.d/backup-couchdb\"`\n\nIf you're on Windows you must also enable the Windows Subsystem for Linux and run the script from bash -- it won't work from CMD or PowerShell.\n\n# Usage\n\nCall the `run.sh` script from bash. You can specify one of three commands: `list`, `backup` or `upload`. The default command is `list`. If you're running this on Windows through WSL, you *may* also need to use `sudo` if you get permission errors, e.g. `sudo ./run.sh command`.\n\n## list (default command)\n\nThis command will list all databases in your CouchDB instance; i.e. it will list all databases that would be backed up by the `backup` command.\n\n```\n./run.sh list\n\n...\nFound the following databases to backup:\ndatabase_one\ndatabase_two\n....\n```\n\n## backup\n\nThis command will dump all of the databases found in the `list` command to the folder `./dumps/yyyy-mm-dd`. Once done it will zip up all files in that folder to `./dumps/yyyy-mm-dd.zip`.\n\n```\n./run.sh backup\n\n...\n... INFO: Output file /mnt/c/Users/nozzlegear/source/fs-couchdump/dumps/2017-10-22/database_one.json\n  % Total    % Received % Xferd  Average Speed   Time    Time\n Time  Current\n                                 Dload  Upload   Total   Spent\n Left  Speed\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- -100  3686    0  3686    0     0   158k      0 --:--:-- --:--:-- --:--:--  163k\n... INFO: File may contain Windows carridge returns- converting...\n... INFO: Completed successfully.\n... INFO: Amending file to make it suitable for Import.\n... INFO: Stage 1 - Document filtering\n... INFO: Stage 2 - Duplicate curly brace removal\n... INFO: Stage 3 - Header Correction\n... INFO: Stage 4 - Final document line correction\n... INFO: Export completed successfully. File available at: /mnt/c/Users/nozzlegear/source/fs-couchdump/dumps/2017-10-22/database_one.json\n...\n\nCreating Zipfile: /mnt/c/Users/nozzlegear/source/fs-couchdump/dumps/2017-10-22.zip (Level: 7)\nAdding File database_one.json\nAdding File database_two.json\nZip successfully created /mnt/c/Users/nozzlegear/source/fs-couchdump/dumps/2017-10-22.zip\n```\n\n## upload\n\nThe upload command will run the [backup](#backup) command and then upload the entire backup folder to [tarsnap](https://www.tarsnap.com). You need to add a tarsnap keyfile somewhere on your machine and make sure the tarsnap config file at `/etc/tarsnap.conf` points to the keyfile. The default location is `/root/tarsnap.key`.\n\nFor increased security, I recommend [using a write-only key](https://www.tarsnap.com/tips.html#write-only-keys).\n\n# Running this script automatically on a schedule\n\nThis project comes with a small cron script to run the backup **and upload** process every day at 10:00 A.M. UTC. To activate the cron job, just copy the `cron/backup-couchdb` file to `/etc/cron`, or even easier, create a symlink so that file is automatically updated whenever you update this repo:\n\n```sh\n# Assuming you're in this repository's root folder\nln -s \"$PWD/cron/backup-couchdb\" \"/etc/cron/backup-couchdb\"\n```\n\n**Make sure `/etc/tarsnap.conf` points to your tarnsap key!**\n\n# Restoring databases\n\nThis script does not handle restoring databases, only backing them up. To restore a database you can use the `couchdb-backup.sh` script in the vendor folder:\n\n```sh\n# -r runs the script in restore mode\n# 127.0.0.1 is your couchdb address\n# -d is the name of the database\n# -f is the name of the dumped json file\nbash vendor/couchdb-backup.sh -r -H 127.0.0.1 -d my-db -f dumpedDB.json\n```\n\nRefer to the documentation for `couchdb-backup.sh` at [https://github.com/danielebailo/couchdb-dump](https://github.com/danielebailo/couchdb-dump).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnozzlegear%2Ffs-couchdump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnozzlegear%2Ffs-couchdump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnozzlegear%2Ffs-couchdump/lists"}