💾 Archived View for yasendfile.org › TipTricks › blog.gmi captured on 2022-07-16 at 14:20:03. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-01-29)

-=-=-=-=-=-=-

Tips and Tricks - Blog

Written by Wim Stockman - last updated on 2022-06-18

Convert epoch date or UNIXTIMESTAMP to other format date

Sat Jun 18 03:42:28 PM CEST 2022

date -d @1652997600 --iso-8601

Result: 2022-05-20

Get all the awk scripts in a dir presented in slmenu. Choose one and execute it

Fri Mar 19 21:16:01 UTC 2021

Slmenu is a cli version of dmenu. (source)

    awk -f ./$(ls *.awk | slmenu -i )
    awk -f ./$(ls *.awk | slmenu -i ) $(ls -tr dir/*)
    awk -f ./$(ls *.awk | slmenu -i ) $(ls -tr dir/* | tail -n1)

Backup your server mariadb database to local computer

Fri Mar 19 21:43:17 UTC 2021

ssh -C host mysqldump yourdatabase > yourdatabase.sql && gzip yourdatabase.sql

The -C in ssh is for compression which saves a lot of time over slower internet connections.

The redirect symbol(">") sents the screen output from the remote machine to the local machine into a file yourdatabase.sql

After succes,thats what the double && are for, gzip database for storage.

Restore your servers mariadb database

copy your backup file to the server

e.g. with scp, rsync ...

scp yourdatabase.sql.gz yourserver:/tmp/
ssh yourserver
cd /tmp
gunzip yourdatabase.sql.gz ; mysql yourdatabase < yourdatabase.sql