On 1st of month do crawler.php with a 2 months gracetime (it was 1 year, before); revert to calling mysqldump instead of mariadb-dump

This commit is contained in:
pezcurrel 2024-01-02 00:46:37 +01:00
parent fac92aefbc
commit 29919f0867

View file

@ -50,13 +50,13 @@ logcmd "php mustool.php updstats" "${logfp}"
if [ `date "+%d"` != "01" ]; then # usa il gracetime di default
log "Eseguo crawler.php con il gracetime di default"
logcmd "php crawler.php" "${crlogfp}"
else # il primo del mese usa un gracetime di 1 anno
log "Eseguo crawler.php con un gracetime di 1 anno"
logcmd "php crawler.php -g 1y" "${crlogfp}"
else # il primo del mese usa un gracetime di 2 mesi
log "Eseguo crawler.php con un gracetime di 2 mesi"
logcmd "php crawler.php -g 2M" "${crlogfp}"
fi
logcmd "php mustool.php shuffle clean optimize" "${logfp}"
ofp="maintain/backups/${dbname}_backup-`date +%Y-%m-%d--%H.%M.%S`.sql"
logcmd "mariadb-dump --defaults-extra-file=${mycfgfp} --single-transaction -r ${ofp} ${dbname}" "${logfp}"
logcmd "mysqldump --defaults-extra-file=${mycfgfp} --single-transaction -r ${ofp} ${dbname}" "${logfp}"
if [ "${ec}" != "0" ]; then
[ -f "${ofp}" ] && rm "${ofp}"
else