dendrite/aws-s3-backup/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 10 Feb 2024 15:40:36 -0600
changeset 229 7e3bf48e516a
parent 174 431c6d5e5dd4
permissions -rw-r--r--
Dendrite tweaks.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
88
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: create s3 backup shell script
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  copy:
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
     6
    src: "dendrite-s3-backup.sh"
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
     7
    dest: "/usr/local/bin/dendrite-s3-backup.sh"
88
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
    mode: "0755"
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
157
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
    10
- name: create s3 backup lifesycle json file
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
    11
  become: yes
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
    12
  copy:
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
    13
    src: "dendrite-s3-backup-lifecycle.json"
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
    14
    dest: "/usr/local/share/dendrite-s3-backup-lifecycle.json"
157
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
    15
    mode: "0755"
5e5c9e605142 Add aws s3 versioning and lifecycles to backup.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
    16
88
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
- name: configure s3 backup systemd service
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
  become: yes
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
  copy:
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
    20
    src: "[email protected]"
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
    21
    dest: "/lib/systemd/system/[email protected]"
90
08764af85bda Fixed file perms on backup service.
Luke Hoersten <luke@hoersten.org>
parents: 89
diff changeset
    22
    mode: "0644"
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
    23
  notify: restart dendrite instance s3 backup
88
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
- name: ensure s3 backup is enabled
63efc98132f7 Added pleroma instance backup to s3.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
  become: yes
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 157
diff changeset
    27
  systemd: name="dendrite-s3-backup@{{dendrite_instance}}.service" enabled="yes"