Skip to content

Commit

Permalink
Add hours, minutes and seconds to the mysql dump filename
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed May 31, 2022
1 parent 080dd20 commit 30ebb4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for elabctl

## Version 3.1.0

* Add hours, minutes and seconds to the mysql dump filename

## Version 3.0.0

* Use borg backup for the backup function -> requires change in configuration to work properly!
Expand Down
4 changes: 2 additions & 2 deletions elabctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://github.com/elabftw/elabctl/
# © 2022 Nicolas CARPi @ Deltablot
# License: GPLv3
declare -r ELABCTL_VERSION='3.0.0'
declare -r ELABCTL_VERSION='3.1.0'

# default backup dir
declare BACKUP_DIR='/var/backups/elabftw'
Expand Down Expand Up @@ -417,7 +417,7 @@ function mysql-backup
set -e

# get clean date
local -r date=$(date --iso-8601) # 2016-02-10
local -r date=$(date +%Y-%m-%d_%H-%M-%S) # 2016-02-10_20-12-45
local -r dumpfile="${BACKUP_DIR}/mysql_dump-${date}.sql"

# dump sql
Expand Down

0 comments on commit 30ebb4c

Please sign in to comment.