Created
May 11, 2021 02:15
-
-
Save fuji44/eaa16db82d2f2b7949ef3c7656e077d1 to your computer and use it in GitHub Desktop.
sqlite3コマンドでバックアップするあれこれ (/bin/sh)
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/sh | |
# basic | |
sqlite3 database.sqlite ".backup backup.sqlite" | |
# timestamp | |
sqlite3 database.sqlite ".backup backup_$(date '+%Y%m%dT%H%M%S%z').sqlite" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment