Add copy symlinks -L

This commit is contained in:
Jeffrey Serio 2024-07-22 00:37:27 -05:00
parent cbd1b777c5
commit 94b6bcc6bb

View File

@ -10,11 +10,11 @@ trap 'rm -rv /home/mastodon/db-backup.sql.temp' EXIT
sudo -u mastodon mv -v /home/mastodon/db-backup.sql /home/mastodon/db-backup.sql.temp sudo -u mastodon mv -v /home/mastodon/db-backup.sql /home/mastodon/db-backup.sql.temp
sudo -u mastodon pg_dump -U mastodon -Fc mastodon_production -p 5432 -f /home/mastodon/db-backup.sql sudo -u mastodon pg_dump -U mastodon -Fc mastodon_production -p 5432 -f /home/mastodon/db-backup.sql
rclone sync -c /etc minio:server0-backup/etc/ rclone sync -L -c /etc minio:server0-backup/etc/
mkdir "${TEMP_DIR}/log" mkdir "${TEMP_DIR}/log"
rsync -avz /var/log/ "${TEMP_DIR}/log" rsync -avz /var/log/ "${TEMP_DIR}/log"
rclone sync "${TEMP_DIR}/log"/ minio:server0-backup/var-log/ rclone sync -L "${TEMP_DIR}/log"/ minio:server0-backup/var-log/
mkdir "${TEMP_DIR}/jas" mkdir "${TEMP_DIR}/jas"
copy_items=( copy_items=(
@ -32,7 +32,7 @@ copy_items=(
for item in "${copy_items[@]}"; do for item in "${copy_items[@]}"; do
rsync -avz "/home/jas/$item" "${TEMP_DIR}/jas" rsync -avz "/home/jas/$item" "${TEMP_DIR}/jas"
done done
rclone sync -c "${TEMP_DIR}/jas"/ minio:server0-backup/home-jas/ rclone sync -L -c "${TEMP_DIR}/jas"/ minio:server0-backup/home-jas/
rclone copy -c /home/mastodon/db-backup.sql minio:server0-backup/home-mastodon/ rclone copy -c /home/mastodon/db-backup.sql minio:server0-backup/home-mastodon/
rclone copy -c /home/mastodon/live/.env.production minio:server0-backup/home-mastodon/ rclone copy -c /home/mastodon/live/.env.production minio:server0-backup/home-mastodon/