OutlineWikiBackup is a tool that allows you to backup your OutlineWiki pages to S3 compatible storage.
Features
- Backup your OutlineWiki pages to S3 compatible storage.
- Customize the backup frequency and retention policy.
- Runs securely in a scratch container, no need to install any dependencies.
Create API Key
- Go to the OutlineWiki instance.
- Click on the user icon in the lower-left corner.
- Click on “Preferences”.
- Click on “API”.
- Click on “+ New API Key”.
Run backup to MinIO bucket using Podman
podman run --rm \
-v /tmp:/tmp:rw \
-e API_BASE_URL='https://myoutlinewiki.example.com' \
-e AUTH_TOKEN='ol_api_abcd1234' \
-e AWS_ACCESS_KEY_ID='AKIA5XQW2PQEEK5FKYFS' \
-e AWS_SECRET_ACCESS_KEY='s3cr3t' \
-e MINIO_ENDPOINT='https://minio.example.com' \
-e S3_BUCKET_NAME='outline' \
-e UPLOAD_TO_S3='true' \
ghcr.io/stenstromen/outlinewikibackup:latest
Kubernetes example a bit further down
Restore from Backup (If needed)
- Go to the OutlineWiki instance.
- Click on the user icon in the lower-left corner.
- Click on “Import”.
- Select a previously exported backup file.
- Click on “Start Import”.
Kubernetes Example (CronJob)
apiVersion: v1
data:
auth-token: b2xfYXBpX2FiY2QxMjM0
minio-access-key-id: QUtJQTVYUVcyUFFFRUs1RktZRlM=
minio-secret-access-key: czNjcjN0
kind: Secret
metadata:
name: outline-backup-secrets
namespace: default
type: Opaque
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: outline-backup
namespace: default
spec:
concurrencyPolicy: Forbid
failedJobsHistoryLimit: 1
jobTemplate:
spec:
activeDeadlineSeconds: 3600
backoffLimit: 2
template:
spec:
containers:
- env:
- name: KEEP_BACKUPS
value: "7"
- name: API_BASE_URL
value: https://outline.example.com
- name: S3_BUCKET_NAME
value: outline
- name: UPLOAD_TO_S3
value: "true"
- name: MINIO_ENDPOINT
value: https://minio.example.com
- name: AUTH_TOKEN
valueFrom:
secretKeyRef:
key: auth-token
name: outline-backup-secrets
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
key: minio-access-key-id
name: outline-backup-secrets
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
key: minio-secret-access-key
name: outline-backup-secrets
securityContext:
runAsUser: 65534
runAsGroup: 65534
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
procMount: Default
capabilities:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
image: ghcr.io/stenstromen/outlinewikibackup:latest
imagePullPolicy: IfNotPresent
name: outline-backup
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- name: tmp
mountPath: /tmp
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- name: tmp
emptyDir: {}
schedule: "@daily"
successfulJobsHistoryLimit: 0
suspend: false
GitHub
For more information, please visit the GitHub repository.