fix shell commands

This commit is contained in:
Christoph Cullmann 2019-04-16 20:01:29 +02:00
parent 4278d9bc05
commit 4bce2c1d86

View file

@ -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) * sync your data, assuming it is in /home and /srv/(ftp/www)
> rsync --delete -av root@$SERV:/home/ /home<br> {{< highlight bash >}}
> rsync --delete -av root@$SERV:/srv/ftp /srv<br> rsync --delete -av root@$SERV:/home/ /home
> rsync --delete -av root@$SERV:/srv/www /srv<br> rsync --delete -av root@$SERV:/srv/ftp /srv
rsync --delete -av root@$SERV:/srv/www /srv
{{< / highlight >}}
* transfer your databases * transfer your databases
> ssh root@$SERV "mysqldump -u root -p$PASS --all-databases > /root/db.sql"<br> {{< highlight bash >}}
> scp root@$SERV:/root/db.sql /root/<br> ssh root@$SERV "mysqldump -u root -p$PASS --all-databases > /root/db.sql"
> mysql -u root -p$PASS < /root/db.sql<br> 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) * sync configs (you might need more, this is just apache & vsftp)
> rsync --delete -av root@$SERV:/etc/httpd /etc<br> {{< highlight bash >}}
> rsync --delete -av root@$SERV:/etc/letsencrypt /etc<br> rsync --delete -av root@$SERV:/etc/httpd /etc
> rsync --delete -av root@$SERV:/etc/vsftpd /etc<br> 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 * 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. 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.