Home Linux script backing up data and copying files to another server
 I want to write a Cent OS script backing up data and copying files to another server every day. I want to set up a script that would dump the DB and then, once that is done, copy the dump file to another server. As I understand, I need to set up a file that would list those commands and then add it into crontab. Where I'm stuck is how to write that file, as I'm not familiar with Linux server commands. Would it be something like that below? What could I fix? #!/bin/sh backupscript -r ~/path/to/db ~/path/to/backup sshpass -f "/path/to/passwordfile" scp -r /some/local/path user@example.com:/some/remote/path  But how will scp know when to run after backupscript is over?