Files
Backup_kube/Nextcloud/nextcloud_export_scripts.configmap.yaml
2024-10-23 15:21:55 +01:00

31 lines
1.3 KiB
YAML

apiVersion: v1
data:
export_calendars.sh: |
#!/usr/bin/env bash
apk update
apk add curl
list='capgemini birmingham cesi papa blueberry personal-1 prometheus birthday maman capgemini_ca-gip shared_shared_by_calendar_sync'
today_date=$(date "+%Y-%m-%d")
mkdir /backup/$today_date
for element in $list;do
curl -u $PI_USER_USERNAME:$PI_USER_PASSWORD https://nextcloud.tryton.geeraert.eu/remote.php/dav/calendars/pi/$element/\?export -o /backup/$today_date/calendar_$element.ics
done
export_contacts.sh: |
#!/usr/bin/env bash
apk update
apk add curl
today_date=$(date "+%Y-%m-%d")
mkdir /backup/$today_date
curl -u $PI_USER_USERNAME:$PI_USER_PASSWORD https://nextcloud.tryton.geeraert.eu/remote.php/dav/addressbooks/users/pi/contacts/?export -o /backup/$today_date/contact_$today_date.vcf
export_notes.sh: |
#!/usr/bin/env bash
today_date=$(date "+%Y-%m-%d")
mkdir /backup/$today_date
cp /var/www/html/data/pi/files/Notes/*.md /backup/$today_date/
# curl -u $PI_USER_USERNAME:$PI_USER_PASSWORD https://nextcloud.tryton.geeraert.eu/remote.php/dav/addressbooks/users/pi/contacts/?export -o /backup/$today_date/contact_$today_date.vcf
kind: ConfigMap
metadata:
creationTimestamp: null
name: nextcloud-export-scripts