Normally the configuration file is stored in /etc/apache2/httpd.conf or /etc/httpd/conf/httpd.conf Execute the following command(s) when you are inside Apache configuration directory. This would return the DocumentRoot directory. You can cross check to be doubly sure.
grep -i 'DocumentRoot' httpd.conf
OR
grep -R "DocumentRoot" sites-enabled
Execute the following command when you are inside the nginx directory(/etc/nginx/)
grep -R "DocumentRoot sites-enabled
which mysqldump
which mongodump
```sudo mongodump --db newdb --out /var/backups/mongobackups/`date +"%m-%d-%y"````
You need to setup a SSH based Passwordless Login from your machine to your backup machine. Read this tutorial for creating a passwordless login link1 and link2.