Skip to content

Instantly share code, notes, and snippets.

@fuji44
Created May 11, 2021 02:15
Show Gist options
  • Save fuji44/eaa16db82d2f2b7949ef3c7656e077d1 to your computer and use it in GitHub Desktop.
Save fuji44/eaa16db82d2f2b7949ef3c7656e077d1 to your computer and use it in GitHub Desktop.
sqlite3コマンドでバックアップするあれこれ (/bin/sh)
#!/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