Skip to content

Instantly share code, notes, and snippets.

@dongbum
Last active December 12, 2023 13:57
Show Gist options
  • Save dongbum/57980067d164df9920e905f17d1d5f3c to your computer and use it in GitHub Desktop.
Save dongbum/57980067d164df9920e905f17d1d5f3c to your computer and use it in GitHub Desktop.

Revisions

  1. dongbum revised this gist Dec 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion teslamate_backup.sh
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,5 @@
    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
    chown viper9:users /disk1/backup/teslamate/teslamate_${today}.backup
    echo "Backup complete."
  2. dongbum created this gist Jul 29, 2021.
    6 changes: 6 additions & 0 deletions teslamate_backup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/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."