Synchronize hosting and local server

Started by arpitapatel9689, Dec 04, 2022, 09:25 AM

Previous topic - Next topic

arpitapatel9689Topic starter


So, the question is, are there programs like git, but only to help in creating and editing a web site?
I'm talking about having 3 copies of the site and the database, on my computer and on the hosting, and when something changes, both versions are synchronized.
I edited the file, saved it, and immediately the same file was updated on the hosting. It 's the same with the database .
  •  

questdsion1234

All popular IDEs have built-in file synchronization mechanisms on web server. You can also use a version control system (if, nevertheless, you will not update one file at a time, but say... finished a piece of work - updated).
You have already been told about migrations and the database.

In general, I do not see the point in editing files on the server or in instant deployment when changing files.
  •  

selearnerlive

- synchronization of the local directory with the contents of the directory on the remote server:

rsync -aqxP --progress user@xx.xx.xx.xx:/tmp/test/ /home/user/test/
- - synchronization of the directory on the remote server with the contents of the local directory:

rsync -aqxP --progress /home/user/test/ user@xx.xx.xx.xx:/tmp/test /
- synchronization on a non-standard port via SSH:

rsync -e='ssh -p 44444' -aqxP /project/webelement/ host.com:/project/webelement/
You can also use the -vz keys

-v- output detailed information about the copying process

-z- compress files before transferring
  •