Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone Site Plugin
This Plugin helps you to clone YouPHPTube sites, it is really helpful for backup routines, load balance, etc.
Check our video tutorial: https://tutorials.youphptube.com/video/backup-or-clone-your-site
In this Feature we have two ends. clients (The Clone) and server (The Master).
Important to inform that every time it is cloned the Client database will be overwritten with the Server database, so if you have upload, comment or view any video on the client, it will be lost.
Basically the process is like that ...
- The Client ask to the Server permission to clone him
- The Server Accept the permission
- The Server makes a Dump of his database, and creates a list of its videos and images (With the file size and Modification time)
- The Client download the database file from the Server and overwrite his own database with the downloaded one
- The Client compare the videos and files list with his own video and files and download the new and the modified files.
- The Client notify the Server the Job and the server delete the generated dump file
- You will need two YouPHPTube installations (Client and Server), with the latest commit on both.
- You must enable the CloneSite Plugin on the Client and on the Server
The Client is a YouPHPTube Site Clone
Follow those steps on your Client
- Fill the cloneSiteURL parameter with the server site
- Click on the Green Button "Clone Now"
- You may be notified with "The URL ... was just added in our server, ask the Server Manager to approve this URL on plugins->Clone Site->Clones Manager (The Blue Button) and Activate your client". So that means your need to approve your client on the Server, otherwise, the clone process will start
The Server is also a YouPHPTube Site where the clients will be cloned from
To approve clients to clone your site click on the blue button "Clones Manager" and the on the green button "Activate" on the left side of the client you want to approve.