You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
383 B
Bash
12 lines
383 B
Bash
5 years ago
|
#!/bin/bash
|
||
5 years ago
|
|
||
5 years ago
|
set -euxo pipefail;
|
||
5 years ago
|
|
||
|
file={{ backups_databases_directory | quote }}"/$1.sql.gpg";
|
||
|
|
||
5 years ago
|
mysqldump --opt --databases "$1" |
|
||
5 years ago
|
pv --quiet --buffer-size 256M |
|
||
5 years ago
|
gpg --quiet --no-verbose --encrypt --recipient {{ backup_gpg_fingerprint | quote }} --trust-model always > "$file";
|
||
5 years ago
|
chmod u+r-wx,g+r-wx,o+r-wx "$file";
|
||
|
{{ global_helper_directory | quote }}/backup_rename.sh "$file";
|