Daily SQLite backup to the NetBackup SMB share plus restore/import/export helpers. SMB credentials moved out of the scripts into ~/.smbcredentials (mode 600) and are passed to smbclient via -A instead of -U "user%pass". This keeps the password out of version control and out of the process list, where -U exposes it to any local user through ps.
7 lines
318 B
Bash
Executable File
7 lines
318 B
Bash
Executable File
#!/bin/bash
|
|
# Mount SMB share for vaultwarden backup cleanup
|
|
mkdir -p /mnt/netbackup
|
|
if ! mountpoint -q /mnt/netbackup; then
|
|
mount -t cifs "//192.168.123.2/NetBackup" /mnt/netbackup \
|
|
-o credentials=/root/.smbcredentials,iocharset=utf8,vers=3.0,uid=1000,gid=1000,file_mode=0666,dir_mode=0777 2>/dev/null
|
|
fi |