First script attempt......Bitwarden backup


Recommended Posts

Hello all, 

 

I use the appdata backup pluggin for all my apps, however I want to make double sure that I have no issues retrieving my passwords for Bitwarden in the event of a system failure. 

 

As such, would the following script work in backing up my Bitwarden passwords to G-Suite via Rclone crypt (I'll set it to run daily);

 

sudo docker stop bitwardenrs
rclone copy /mnt/user/appdata/bitwarden/ GoogleDriveBackupCrypt:unraid/Bitwarden_Backup
sudo docker start bitwardenrs

 

This is my first attempt at any sort of script that I haven't simply copied and pasted from a tutorial.

 

Many thanks. 

 

***Edit***

It works, well when I press "run in background" anyway, so should be ok running via schedule. 

 

It's the simplest script I think you could run, but I'm quietly pleased I managed it myself. 😂

Edited by LoneTraveler
  • Like 2
Link to comment
  • 1 year later...
  • 1 month later...

This is a nice idea!

 

I'm going to try to pad it out a little more to answer the questions about what's backed up, and setting up cron jobs to do it on a scheduled but it's deffo I great starting point for anyone who wants an application aware backup of their bitwarden / vaultwarden vault! 

Link to comment
On 8/15/2020 at 2:36 PM, BeardedNoir said:

Hello all, 

 

I use the appdata backup pluggin for all my apps, however I want to make double sure that I have no issues retrieving my passwords for Bitwarden in the event of a system failure. 

 

 

Good to hear that the back-up process works for you. Just out of curiosity, did you actually try to recover that back-up into freshly new bw install, to make sure the back-up can be restored including all user accounts, and their data?

Link to comment
  • 2 years later...
On 10/13/2021 at 4:49 PM, Januszmirek said:

 

Good to hear that the back-up process works for you. Just out of curiosity, did you actually try to recover that back-up into freshly new bw install, to make sure the back-up can be restored including all user accounts, and their data?

I know this is an old post but hopefully the question is still relevant to someone! Well, it was to me yesterday...

 

I can confirm that this method works. I tested it by:

 

  1. Running the OP's script to backup my VaultWarden container to a cloud service,
  2. Then I created a second VaultWarden container (pointing it to a different data directory),
  3. Stopped the container,
  4. From the command line I copied back from the cloud service to overwrite the files in the new data directory,
  5. Then fired up the 2nd container
  6. And finally tested it by logging in and checking my settings and vault contents.

 

Boom, I essentially have a duplicate working VaultWarden.

Link to comment
  • 5 weeks later...
On 12/9/2023 at 12:09 AM, DANgerous25 said:

I know this is an old post but hopefully the question is still relevant to someone! Well, it was to me yesterday...

 

I can confirm that this method works. I tested it by:

 

  1. Running the OP's script to backup my VaultWarden container to a cloud service,
  2. Then I created a second VaultWarden container (pointing it to a different data directory),
  3. Stopped the container,
  4. From the command line I copied back from the cloud service to overwrite the files in the new data directory,
  5. Then fired up the 2nd container
  6. And finally tested it by logging in and checking my settings and vault contents.

 

Boom, I essentially have a duplicate working VaultWarden.

That's great. Can you confirm that you were actually able to recover other users account data? I have multiple accounts set up on my vaultwarden instance and am interested to know if all these accounts can be restored when needed. Thanks;)

Link to comment
8 hours ago, Januszmirek said:

That's great. Can you confirm that you were actually able to recover other users account data? I have multiple accounts set up on my vaultwarden instance and am interested to know if all these accounts can be restored when needed. Thanks;)

 

My setup is only a single user, so I can’t answer conclusively. However, I don’t see why it shouldn’t work for all of your users, because all it is doing is essentially making a clone of your installation.

 

Best bet is to test it for yourself (as in the worst case scenario it will be good for you to know it does work and how to do it!).

Link to comment
7 hours ago, DANgerous25 said:

 

My setup is only a single user, so I can’t answer conclusively. However, I don’t see why it shouldn’t work for all of your users, because all it is doing is essentially making a clone of your installation.

 

Best bet is to test it for yourself (as in the worst case scenario it will be good for you to know it does work and how to do it!).

Fair point. So I just go and install the same container under a different name and it becomes a completely separate instance I can play with?

Link to comment
1 hour ago, Januszmirek said:

Fair point. So I just go and install the same container under a different name and it becomes a completely separate instance I can play with?

Yes exactly. The only thing to change is the data directory of the second container when you set it up. When you restore your backup, restore it to that 2nd data directory. (Otherwise you will restore over your existing instance which may result in data loss if you saved anything in your vault since your backup). 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.