How does the cPanel backup and backup restore feature affect the cPanel GIT feature? Do I have to choose between the two?

berrymetal

Member
May 16, 2020
15
2
3
Denmark
cPanel Access Level
Root Administrator
I am not seeing issues yet, I am about to start to use the cPanel GIT feature and I am worried that it would interfer with the built in cPanel backup restore feature. Both the cPanel backup restores and the cPanel git deployments are "writing" the production site.

So let's say that:

1. I start using GIT On September 1., I make some changes to the site, and I deploy it, publish it via GIT for the first time, on September the first. That will change my production site AND my repository.

2. On September 10. I do an other change on the site, followed by deploy/publish with GIT, both my site and repo will be changed again.

2. On September 15. I restore a cPanel backup that was made on September 5. , meaning it was made after my first deploy.

Will that backup restore change back both my production site and my repository, or only my production site?

If it only changes back my site and not my repository, then at the next deployment conflicts could occur, perhaps?

Will the backup restore have the same outcome indifferently that I used GIT push or GIT pull for the deployment?

Thanks! Have a nice day!
 

berrymetal

Member
May 16, 2020
15
2
3
Denmark
cPanel Access Level
Root Administrator
So my concern is that backup restores might break the sync between my repo and production site, after a cPanel backup restoration?

Because my repo and production site should be identic after every deployment. (I want to make my public_html my repository, and that is the cPanel default repo, is that right?)
 

berrymetal

Member
May 16, 2020
15
2
3
Denmark
cPanel Access Level
Root Administrator
But if the cPanel repo is contained within the backup, then at backup restore both the deployed production site and the repo will be changed back accordingly, so they will not go out of sync, is that right?
And after backup restores there is no need for me to execute any GIT commands to get GIT repo in sync again with my live site?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,235
2,423
363
cPanel Access Level
Root Administrator
Thanks for the detailed explanation. I would not expect them to get out of sync as the backup for both the site and repo were taken at the same time. The backup would restore the entire cPanel account, site and repo all, to the time when it was created.