Compare commits
No commits in common. "652c1b577814767b82b111927774cf8a91df3667" and "72a4be3c5dd52a346749392eecbdc16863f550ad" have entirely different histories.
652c1b5778
...
72a4be3c5d
1 changed files with 2 additions and 9 deletions
11
backup.nix
11
backup.nix
|
@ -1,18 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
#necessary prep work:
|
||||
# GRANT CONNECT ON DATABASE misskey TO "misskey-backup";
|
||||
# GRANT SELECT ON ALL TABLES IN SCHEMA public TO "misskey-backup";
|
||||
# GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "misskey-backup";
|
||||
#
|
||||
# TODO: automate this cause it needs to be done whenever db schema changes
|
||||
let
|
||||
user = "misskey-backup";
|
||||
group = user;
|
||||
|
||||
# shell script file to be sourced. must have values "MISSKEY_BACKUP_BUCKET" "MISSKEY_BACKUP_PREFIX" and "S3CFG"
|
||||
# $S3CFG must be a path to a .s3cfg file compatible with s3cmd
|
||||
backupConfigFile = "/etc/misskey-backup/conf";
|
||||
backupConfigFile = "/etc/misskey-backup";
|
||||
backupScript = pkgs.writeShellApplication {
|
||||
name = "misskey-backup";
|
||||
|
||||
|
@ -23,7 +16,7 @@ let
|
|||
coreutils
|
||||
];
|
||||
|
||||
excludeShellChecks = [ "SC1091" ];
|
||||
extraShellCheckFlags = [ "-x" "/etc/misskey-backup" ];
|
||||
|
||||
text = ''
|
||||
source "${backupConfigFile}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue