feat: add manual backup job
This commit is contained in:
@@ -6,13 +6,13 @@ return {
|
|||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
luau = { "stylua" },
|
luau = { "stylua" },
|
||||||
rust = { "rustfmt", lsp_format = "fallback" },
|
rust = { "rustfmt", lsp_format = "fallback" },
|
||||||
javascript = { "prettier" },
|
javascript = { "prettierd" },
|
||||||
typescript = { "prettier" },
|
typescript = { "prettierd" },
|
||||||
json = { "prettier" },
|
json = { "prettierd" },
|
||||||
tsx = { "prettier" },
|
tsx = { "prettierd" },
|
||||||
nix = { "nixfmt" },
|
nix = { "nixfmt" },
|
||||||
go = { "gofmt" },
|
go = { "gofmt" },
|
||||||
svelte = { "prettier" },
|
svelte = { "prettierd" },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
-- These options will be passed to conform.format()
|
-- These options will be passed to conform.format()
|
||||||
|
|||||||
33
nix/homelab/kustomize/backup-job-manual.yaml
Normal file
33
nix/homelab/kustomize/backup-job-manual.yaml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: minecraft-backup-manual
|
||||||
|
namespace: minecraft
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: backup
|
||||||
|
image: busybox
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -e
|
||||||
|
BACKUP_FILE=/backups/manual/minecraft-main-manual.tar.gz
|
||||||
|
echo "creating backup: ${BACKUP_FILE}"
|
||||||
|
tar -czf "${BACKUP_FILE}" -C /data .
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
- name: backups
|
||||||
|
mountPath: /backups
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: minecraft-main-datadir
|
||||||
|
- name: backups
|
||||||
|
nfs:
|
||||||
|
server: 192.168.27.2
|
||||||
|
path: /backup/minecraft
|
||||||
Reference in New Issue
Block a user