I have an Ubuntu 16.04.2 DigitalOcean VPS to which I usually SSH with Putty and make changes in there, but I recently found out I can make a duplicate of this server in my PC (Win10 home with WSL), do the changes here locally, and then mirror them (while SSH tunneled) via a program called
rsync, if everything went good. The main benefit here is a comfortable, primary layer of backup.
If it is possible to use rsync in the WSL beta, how is it done from the moment
rsync is installed, for example, if I raise up a server environment at my Win10 home WSL with this code:
apt-get update -y && apt-get upgrade -y apt-get install tree zip unzip make php-zip php-curl php-xml php-gd apt-get install fail2ban apt-get install lamp-server^ -y a2enmod rewrite sed -i 's/post_max_size \= .M/post_max_size \= 200M/g' /etc/php/7.0/apache2/php.ini # regex dot instead of 2 or 8. sed -i 's/upload_max_filesize \= .M/upload_max_filesize \= 200M/g' /etc/php/7.0/apache2/php.ini cat <<-'LAMPENV' >> /etc/apache2/apache2.conf <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> LAMPENV systemctl restart apache2.service
and I then bring up the websites on my PC locally with
localhost/site_name, how do I mirror it with
rsync to the VPS?
I ask this question mainly to see if what I described so far is enough - if I don't miss anything.
In an answer, please review the way I described above as a basis for the
rsync action and say if something missing, and detail how you would do so with
rsync in WSL afterwards.