跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[分享创造] vaultwarden 备份思路之再也不改版

发表于

vaultwarden 用了几年,备份方案翻来覆去折腾了好多种,这次利用 nginx syslog 实现“精确”的备份:

log_format json-log escape=json '{"status":$status,"request_method":"$request_method","request_uri":"$request_uri"}';

server {
    location / {
        # ...

        proxy_redirect off;
        proxy_pass http://vaultwarden;
        proxy_http_version 1.1;

        access_log syslog:server=syslog-server:50333,facility=local7,tag=nginx,severity=info,nohostname json-log;
    }
}

这样 syslog-server:50333 就可以收到完成的请求,可以拿到 status request_method request_uri 等信息,如此只需要实现个简单的 syslog server ,便可以根据这些信息来决定是否调用备份:例如所有 GET 请求都无需关心,因为对数据库没有更改;例如我不关心登录、注册、设备、二次验证之类的变更,则 ^/identity/accounts/prelogin ^/identity/connect/token .*/devices/.* .*/two-factor/.* 等请求也可以略过;例如我不使用 sends ,.*/sends/.* 也可以忽略。

bitwarden 客户端让每一次更改都必须对应 vaultwarden 数据库的更改,这个备份方案理论上也可以确保对自己有价值的变更都被备份。

部署运行了一周,我很喜欢这个方案

诸位觉得如何

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.