File tree Expand file tree Collapse file tree 5 files changed +29
-1
lines changed Expand file tree Collapse file tree 5 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 20
20
with :
21
21
name : " rsync-host"
22
22
username : " ajayyy"
23
- folder : " ./rsync"
23
+ folder : " ./containers/rsync"
24
+ secrets :
25
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
+ backup-db :
27
+ uses : ./.github/workflows/docker-build.yml
28
+ with :
29
+ name : " db-backup"
30
+ username : " ajayyy"
31
+ folder : " ./containers/backup-db"
24
32
secrets :
25
33
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ FROM alpine
2
+ RUN apk add postgresql-client
3
+ RUN apk add restic --repository http://dl-cdn.alpinelinux.org/alpine/latest-stable/community/
4
+
5
+ COPY ./backup.sh /usr/src/app/backup.sh
6
+ RUN chmod +x /usr/src/app/backup.sh
7
+ COPY ./backup.sh /usr/src/app/forget.sh
8
+ RUN chmod +x /usr/src/app/forget.sh
9
+
10
+ RUN echo '30 * * * * /usr/src/app/backup.sh' >> /etc/crontabs/root
11
+ RUN echo '10 0 * * 1 /usr/src/app/forget.sh' >> /etc/crontabs/root
12
+
13
+ CMD crond -l 2 -f
Original file line number Diff line number Diff line change
1
+ mkdir ./dump
2
+
3
+ pg_dump -f ./dump/sponsorTimes.dump sponsorTimes
4
+ pg_dump -f ./dump/privateDB.dump privateDB
5
+
6
+ restic backup ./dump
Original file line number Diff line number Diff line change
1
+ restic forget --prune --keep-last 48 --keep-daily 7 --keep-weekly 8
File renamed without changes.
You can’t perform that action at this time.
0 commit comments