Last active
December 12, 2023 13:57
-
-
Save dongbum/57980067d164df9920e905f17d1d5f3c to your computer and use it in GitHub Desktop.
teslamate backup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
today=$(date "+%Y%m%d") | |
now=$(date "+%H%M%S") | |
docker-compose exec -T database pg_dump -U teslamate teslamate > /disk1/backup/teslamate/teslamate_${today}_${now}.backup | |
chown viper9:users /disk1/backup/teslamate/teslamate_${today}.backup | |
echo "Backup complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment