Fix dbadmin backup file and add lazygit alias

This commit is contained in:
Tim 2024-09-26 16:56:17 +02:00
parent 48cd672fe1
commit 08fa86e905
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@ database=$1
server=$2
echo "Backing up ${database}@${server}"
command="cd dbmanager && ./bin/console db:backup ${database}"
command="cd dbmanager && ./bin/console app:db:backup ${database}"
name=$(ssh www-data@${server} "${command}" | awk -F'-|\\.def' '{split($1,a," ")}$0=a[4]')
echo "Backup filename: ${name}"
@ -13,4 +13,4 @@ echo "Copying ${name} to ${local_dir}"
scp -C www-data@${server}:/var/www/dbmanager/${name} "${local_dir}"
echo "Purging and restoring back to ${database}"
cd ${local_dir} && ./bin/console db:purge ${database} && ./bin/console db:restore ${database} ${name}
cd ${local_dir} && ./bin/console app:db:purge ${database} && ./bin/console app:db:restore ${database} ${name}

View File

@ -11,6 +11,7 @@ alias gs='git status'
alias gdq='screen -d -m streamlink https://www.twitch.tv/gamesdonequick best -p mpv'
alias f=z
alias lg=lazygit
alias fixtime='sudo hwclock --hctosys'
alias sc='./bin/console'