parent
be02df63c4
commit
0bebbc32df
61 changed files with 194 additions and 77 deletions
@ -1,7 +1,9 @@ |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
/usr/bin/mysqldump --user={{ dolibarr_db_user }} \ |
||||
--password={{ dolibarr_db_pass | quote }} \ |
||||
--host={{ dolibarr_db_server }} \ |
||||
--quick --single-transaction \ |
||||
--add-drop-table {{ dolibarr_db_name }} | lz4 -c > {{ dolibarr_root_dir }}/db_dumps/{{ dolibarr_db_name }}.sql.lz4 |
||||
--add-drop-table {{ dolibarr_db_name }} | zstd -c > {{ dolibarr_root_dir }}/db_dumps/{{ dolibarr_db_name }}.sql.zst |
||||
|
@ -1,3 +1,3 @@ |
||||
#!/bin/sh |
||||
|
||||
rm -f {{ etherpad_root_dir }}/db_dump/* |
||||
rm -f {{ etherpad_root_dir }}/db_dumps/* |
||||
|
@ -1,7 +1,9 @@ |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
/usr/bin/mysqldump --user={{ etherpad_db_user }} \ |
||||
--password='{{ etherpad_db_pass }}' \ |
||||
--password={{ etherpad_db_pass | quote }} \ |
||||
--host={{ etherpad_db_server }} \ |
||||
--quick --single-transaction \ |
||||
--add-drop-table {{ etherpad_db_name }} | lz4 -c > {{ etherpad_root_dir }}/db_dumps/{{ etherpad_db_name }}.sql.lz4 |
||||
--add-drop-table {{ etherpad_db_name }} | zstd -c > {{ etherpad_root_dir }}/db_dumps/{{ etherpad_db_name }}.sql.zst |
||||
|
@ -1,4 +1,6 @@ |
||||
#!/bin/bash -e |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
mkdir -p /home/lbkp/mongo |
||||
mongodump --username {{ mongo_admin_user }} --password {{ mongo_admin_pass | quote }} --quiet --port {{ mongo_port }} --out /home/lbkp/mongo |
||||
|
@ -1,4 +1,6 @@ |
||||
#!/bin/bash -e |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
sqlite3 {{ nd_root_dir }}/data/navidrome.db .dump | zstd -c > {{ nd_root_dir }}/backup/navidrome.sql.zst |
||||
cp {{ nd_root_dir }}/etc/navidrome.toml {{ nd_root_dir }}/backup/ |
||||
|
@ -1,4 +1,6 @@ |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
mkdir -p /home/lbkp/omv |
||||
cp /etc/openmediavault/* /home/lbkp/omv/ |
||||
|
@ -1,4 +1,6 @@ |
||||
#!/bin/bash -e |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
/usr/bin/systemd-cat /usr/bin/pmgbackup backup |
||||
cp -a /etc/opendkim/keys /home/lbkp/pmg/ |
||||
|
@ -1,18 +1,22 @@ |
||||
#!/bin/bash -e |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
LDB_MODULES_PATH=/usr/lib64/samba/ldb |
||||
export LDB_MODULES_PATH |
||||
|
||||
mkdir -p /home/lbkp/samba/{private,ldif/sam.ldb.d,gpo} |
||||
tar cf /home/lbkp/samba/sysvol.tar.lz4 --use-compress-program=lz4 -C /var/lib/samba/sysvol . |
||||
mkdir -p /home/lbkp/samba/{private,ldif/sam.ldb.d,offline} |
||||
tar cf /home/lbkp/samba/sysvol.tar.zst --use-compress-program=zstd -C /var/lib/samba/sysvol . |
||||
find /var/lib/samba/private/ -type f -name \*.ldb | xargs tdbbackup |
||||
pushd /var/lib/samba/private/ > /dev/null |
||||
find . -type f -name \*.bak | xargs cp --parents -t /home/lbkp/samba/private/ |
||||
popd > /dev/null |
||||
find /var/lib/samba/private -type f -name \*.bak | xargs rm -f |
||||
find /home/lbkp/samba/private/ -type f -name \*.bak | while read F; do mv "$F" "${F%.bak}"; done |
||||
tar cf /home/lbkp/samba/private.tar.lz4 --use-compress-program=lz4 -C /home/lbkp/samba/private . |
||||
tar cf /home/lbkp/samba/private.tar.zst --use-compress-program=zstd -C /home/lbkp/samba/private . |
||||
rm -rf /home/lbkp/samba/private/ |
||||
for LDIF in $(find /var/lib/samba/private/ -type f -name \*.ldb); do |
||||
ldbsearch --url=$LDIF | lz4 -c > /home/lbkp/samba/ldif/$(echo $LDIF | sed -e 's/\/var\/lib\/samba\/private//').ldif.lz4 |
||||
ldbsearch --url=$LDIF | zstd -c > /home/lbkp/samba/ldif/$(echo $LDIF | sed -e 's/\/var\/lib\/samba\/private//').ldif.zst |
||||
done |
||||
# Also take a more standard offline backup |
||||
samba-tool domain backup offline --targetdir=/home/lbkp/samba/offline/ |
||||
|
@ -1,4 +1,6 @@ |
||||
#!/bin/bash -e |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
mkdir -p {{ unifi_root_dir }}/backup/mongo |
||||
mongodump --quiet --port 27117 --out {{ unifi_root_dir }}/backup/mongo |
||||
|
@ -1,12 +1,14 @@ |
||||
#!/bin/bash -e |
||||
#!/bin/sh |
||||
|
||||
set -eo pipefail |
||||
|
||||
/usr/bin/mysqldump \ |
||||
{% if not wp_db_server in ['localhost', '127.0.0.1'] %} |
||||
--user='{{ wp_db_user }}' \ |
||||
--password='{{ wp_db_pass }}' \ |
||||
--host='{{ wp_db_server }}' \ |
||||
--port='{{ wp_db_port }}' \ |
||||
--user={{ wp_db_user }} \ |
||||
--password={{ wp_db_pass | quote }} \ |
||||
--host={{ wp_db_server }} \ |
||||
--port={{ wp_db_port }} \ |
||||
{% endif %} |
||||
--quick --single-transaction \ |
||||
--add-drop-table '{{ wp_db_name }}' | zstd -c > {{ wp_root_dir }}/backup/{{ wp_db_name }}.sql.zst |
||||
--add-drop-table {{ wp_db_name }} | zstd -c > {{ wp_root_dir }}/backup/{{ wp_db_name }}.sql.zst |
||||
|
||||
|
Loading…
Reference in new issue