Use the below CLI commands to backup important files in a server.
PS: have in mind that this assumes a specific folder structure
cd / && tar -zcf /data/backup/server_etc_[project-name]_prod_backup_[date].tar.gz etc
cd /data && tar -zcf /data/backup/projects_[project-name]_prod_backup_[date].tar.gz projects
cd backup/ && mysqldump --all-databases --single-transaction --quick --lock-tables=false > full-[project-name]-backup-$(date +%F).sql -u root -p
Full backup of your databases
mysqldump --all-databases --single-transaction --quick --lock-tables=false > full-backup-$(date +%F).sql -u root -p
tar -zcvf archive-name.tar.gz directory-name
sudo nano /etc/shells
chsh
Some info regarding its options can be found on ln Linux manual
ln -s <correct_path> <shortcut_location>
More about this in article How to Create Symbolic Links Using the ln Command
Start & Stop services on CentOS 7
systemctl status httpd
systemctl restart httpd
httpd -t
# Redirection
RewriteBase /
RewriteRule ^old-url.html(/.*)?$ new-ur$1 [R=302,L]
server {
# Create redirections of /some-path/url -> /url
rewrite ^/some-path/(.*)$ https://$host/$1;
}
See more about nginx configuration here.