{"id":17685778,"url":"https://github.com/dangerdev004/bwbackup","last_synced_at":"2025-03-30T20:25:36.669Z","repository":{"id":212541722,"uuid":"640306208","full_name":"dangerdev004/bwbackup","owner":"dangerdev004","description":"Backup for Bitwarden","archived":false,"fork":false,"pushed_at":"2024-07-08T20:47:07.000Z","size":34,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T23:26:08.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dangerdev004.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":"2023-05-13T16:43:41.000Z","updated_at":"2024-07-08T20:47:10.000Z","dependencies_parsed_at":"2023-12-14T20:57:58.164Z","dependency_job_id":"f1edfe54-070b-4f76-b265-13fa3d5a50f9","html_url":"https://github.com/dangerdev004/bwbackup","commit_stats":null,"previous_names":["dangerdev004/bwbackup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dangerdev004%2Fbwbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dangerdev004%2Fbwbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dangerdev004%2Fbwbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dangerdev004%2Fbwbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dangerdev004","download_url":"https://codeload.github.com/dangerdev004/bwbackup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246375492,"owners_count":20767117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-24T10:29:00.252Z","updated_at":"2025-03-30T20:25:36.644Z","avatar_url":"https://github.com/dangerdev004.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bwbackup (BitWarden Backup)\n\u003cp\u003eThis is a shell script to backup your bitwarden vault onto a cloud server \u0026 a local encrypted storage with encryption.\n\u003cp\u003e\u003c/p\u003eThis script also creates different versions everytime and keeps the old one as well and it will shred the .csv file and the container at the end as well.\n\u003cp\u003e\u003c/p\u003eYou will need some additional setup to do this securely.\n\n# Setting up Dependencies\n  This script requires **bitwarden-cli** \u0026 **direnv** installed on your system. To install bitwarden-cli \u0026 direnv refer to **[Bitwarden CLI Installation Guide](https://bitwarden.com/help/cli/)** \u0026 **[Direnv Installation Guide](https://github.com/direnv/direnv/blob/master/docs/installation.md)** respectively\n\n1. We will create a separate partition which will be password protected. We will use **LUKS** to achieve this. This guide will help you in doing so\n      **\u003cp\u003e[LUKS Encryption Guide](https://www.redhat.com/sysadmin/disk-encryption-luks)\u003c/p\u003e**\n2. Once created create a .txt file inside this encrypted partition and keep it hidden by putting a .(dot) before the filename.\n3. You will need to type the following inside it:\n      \u003cp\u003e\u003cdir=\"auto\"\u003e\u003ccode\u003eexport BITPASS=\u003ci\u003e\"Your bitwarden vault password\"\u003c/i\u003e\u003c/code\u003e\u003c/p\u003e\n      \u003cp\u003e\u003cdir=\"auto\"\u003e\u003ccode\u003eexport ZIPASS=\u003ci\u003e\"The password of the file you want to keep\"\u003c/i\u003e\u003c/code\u003e\u003c/p\u003e\n\n##  Explaination for prior steps\nThese are environment variables that are needed to be set prior to the running of the script. We are using a zip file encryption to encrypt the .csv file which will be exported at the time of creating backup.\n#\n\n4. There is one final setup that is **setting up direnv**\n      \u003cp\u003e\u003ccode\u003eeval \"$(direnv hook zsh)\"\u003c/code\u003e\u003c/p\u003e\n    This will enable direnv to read environment variables from the files you want it to. Direnv is kind of like setting a local environment variable that only works in a certain folder\n5. Now create a \u003ccode\u003e.envrc\u003c/code\u003e file where you have stored the script \n      \u003cp\u003e\u003ccode\u003eexport DEVICEPASSWORD=\u003ci\u003e\"Your encrypted drive password\"\u003c/i\u003e\u003c/code\u003e\u003c/p\u003e\n6. Enter the the command \n      \u003cp\u003e\u003ccode\u003edirenv allow \u003ci\u003e\"The path of .envrc file\"\u003c/i\u003e\u003c/code\u003e\u003c/p\u003e\n7. You will need a cloud storage mounted on your system. I use **onedriver** for this purpose but you can use anything else if you want. You can use **Rclone** if you want to use Google Drive\n\n      [Onedriver](https://github.com/jstaf/onedriver)|[Rclone](https://rclone.org/)\n\n**You are now all set with the prerequisites, make sure you are logged in your bitwarden vault through cli**\n\n8. Download the script\n9. Give permissions\n      \u003cp\u003e\u003cdir=\"auto\"\u003e\u003ccode\u003e sudo chmod +x ./bwbackup.sh \u003c/code\u003e\u003c/p\u003e\n10. Run the script\n      \u003cp\u003e\u003cdir=\"auto\"\u003e\u003ccode\u003e./bwbackup.sh\u003c/code\u003e\u003c/p\u003e\n11. Enter the sudo password\n12. The backup will be created\n\n## Disclaimer\n### Read the GPL 3.0 License\n\n### This is a personal project please be patient if any issue arises.\n\n#### Note: There my be some security risks while using this script please be cautious.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdangerdev004%2Fbwbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdangerdev004%2Fbwbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdangerdev004%2Fbwbackup/lists"}