All the scripts I've seems to be pushing code from server to a backup server, I am trying to set the backup server to pull code from a live server.
I've managed it with the sql:
ssh -C [email protected] mysqldump -u user --password=test example | gzip > Backups/SQL_Backups/example/example_`date +%d%b%Y`.sql.gz
And that works perfectly, but now I'm trying to tar
a public folder and send it back, so far I've managed to ssh on and tar
the correct folder, but how do I send it back?
ssh -C [email protected] tar -c --bzip2 -f backup.tar /home/user/example.com/public/
I've tried doing this but it creates a blank archive
ssh -C [email protected] tar -c --bzip2 -f backup.tar /home/user/example.com/public/ | Backups/File_Backups/example/example_public_`date +%d%b%Y`.tar