liamloveslearning Posted February 3, 2010 Share Posted February 3, 2010 Hi everybody, I setup a cron daily job to backup all of my databases to a folder on my server, I now wish to send the files to another server I have daily, Ive read somewhere this can be achieved via sftp only I cant seem to find any information, im unsure if im googling the wrong thing.. Has anybody any advice on this matter? Quote Link to comment https://forums.phpfreaks.com/topic/190775-sftp-cron/ Share on other sites More sharing options...
trq Posted February 3, 2010 Share Posted February 3, 2010 You could also use scp. eg: scp /path/to/local/file username@remoteserver:/path/to/remote/file man scp for more info. Quote Link to comment https://forums.phpfreaks.com/topic/190775-sftp-cron/#findComment-1006399 Share on other sites More sharing options...
oni-kun Posted February 4, 2010 Share Posted February 4, 2010 Mmmmmm. Yes, SCP. But only use it on local files, never back up the database and directly export it to the other server, or you'll surely hang your site for quite some time. Quote Link to comment https://forums.phpfreaks.com/topic/190775-sftp-cron/#findComment-1006607 Share on other sites More sharing options...
divinequran Posted February 26, 2010 Share Posted February 26, 2010 So, he can use rsync. Am I right? Quote Link to comment https://forums.phpfreaks.com/topic/190775-sftp-cron/#findComment-1018323 Share on other sites More sharing options...
tallship Posted March 4, 2010 Share Posted March 4, 2010 So, he can use rsync. Am I right? Absolutely. That's my recommendation. You can indeed copy and tar/gzip your database (If it's MySQL, because everything is just stored as a file and can be copied over to another MySQL server and run there) - but stop the database server first. You'll need to create the correct dbuser/pwd on the other MySQL server, btw. If you can't stop the database server, then do a dump of your database, rsync it on over, and then load the database on the other database server. Alternatively, you can write out duplicate transactions if "network" has been enabled on the other MySQL server AND, the port (TCP 3306) is open on the other server. Quote Link to comment https://forums.phpfreaks.com/topic/190775-sftp-cron/#findComment-1021426 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.