0

I am looking to have three web folders one would serve as a backup and rollback and one for testing new releases.

/var/web/project
/var/web/project_test
/var/web/project_backup

Say I upload my code to project_test and I'm happy with it. I'm now ready to release it. How would I then have a singular command that would..

1) Move 'project' into 'project_backup'.  
2) Move 'project_test' into 'project' 
3) Delete whats in backup
2
  • You may want to expand on what you mean ( and why you say) singular command as it will frame the sort of answers you will receive. What have you tried so far? Oct 7, 2013 at 9:18
  • I would personally upload a folder for each version having them accessible through some sort of rewrite. Production could be managed by a symlink you point to whichever version you like. Oct 7, 2013 at 9:23

1 Answer 1

2

You can always write a bash script:

#!/usr/bin/bash
rm /var/web/project_backup
mv /var/web/project /var/web/project_backup
mv /var/web/project_test /var/web/project
mkdir /var/web/project_test

Another way, if you're using a CVS (eg git) is using different branches for different stages, and commiting/fetching from/to a branch you need.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .