Some command to remote backup and restore

Direct insert into remote DB

mysqldump --all-databases | ssh user@host "mysql -uUser -pPassword "
If you want to pass through a proxy host :
mysqldump --all-databases | ssh user@proxy -A -J user@host "mysql -uUser -pPassword "

Create an archive

mysqldump --all-databases | xz | ssh user@host "cat > /tmp/dump.sql.xz"

Master - Slave configuration

On master run :
Create user : GRANT REPLICATION SLAVE ON *.* TO ‘repli_user’@'slave_host’ IDENTIFIED BY 'motdepasse';
Then still on master (it will lock the table):

FLUSH PRIVILEGES;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;

Get the position from the last command and note it somewhere.

On the slave :

CHANGE MASTER TO MASTER_HOST='master_host', MASTER_USER='repli_user', MASTER_PASSWORD='motdepasse', MASTER_LOG_POS=LOGPOS;
START SLAVE;

Then finally on master : UNLOCK TABLES;