From 4bce2c1d8603808030fcfcd99807d579e3ef9291 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Tue, 16 Apr 2019 20:01:29 +0200 Subject: fix shell commands --- content/posts/webserver-transition.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/content/posts/webserver-transition.md b/content/posts/webserver-transition.md index e674571..f158c15 100644 --- a/content/posts/webserver-transition.md +++ b/content/posts/webserver-transition.md @@ -24,25 +24,33 @@ Best use the raw IP as address if you are in parallel updating your DNS entries * sync your data, assuming it is in /home and /srv/(ftp/www) -> rsync --delete -av root@$SERV:/home/ /home
-> rsync --delete -av root@$SERV:/srv/ftp /srv
-> rsync --delete -av root@$SERV:/srv/www /srv
+{{< highlight bash >}} +rsync --delete -av root@$SERV:/home/ /home +rsync --delete -av root@$SERV:/srv/ftp /srv +rsync --delete -av root@$SERV:/srv/www /srv +{{< / highlight >}} * transfer your databases -> ssh root@$SERV "mysqldump -u root -p$PASS --all-databases > /root/db.sql"
-> scp root@$SERV:/root/db.sql /root/
-> mysql -u root -p$PASS < /root/db.sql
+{{< highlight bash >}} +ssh root@$SERV "mysqldump -u root -p$PASS --all-databases > /root/db.sql" +scp root@$SERV:/root/db.sql /root/ +mysql -u root -p$PASS < /root/db.sql +{{< / highlight >}} * sync configs (you might need more, this is just apache & vsftp) -> rsync --delete -av root@$SERV:/etc/httpd /etc
-> rsync --delete -av root@$SERV:/etc/letsencrypt /etc
-> rsync --delete -av root@$SERV:/etc/vsftpd /etc
+{{< highlight bash >}} +rsync --delete -av root@$SERV:/etc/httpd /etc +rsync --delete -av root@$SERV:/etc/letsencrypt /etc +rsync --delete -av root@$SERV:/etc/vsftpd /etc +{{< / highlight >}} * get crontabs over for later re-use, store them in the root home -> rsync --delete -av root@$SERV:/var/spool/cron /root +{{< highlight bash >}} +rsync --delete -av root@$SERV:/var/spool/cron /root +{{< / highlight >}} Now all things should be there and after some service restarts e.g. [WordPress](https://wordpress.org/) powered pages should be up-and-running again. -- cgit v1.2.3