LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-26-2006, 03:04 PM   #1
daiver
Member
 
Registered: Oct 2003
Location: Uruguay
Distribution: PCLinuxOS
Posts: 53

Rep: Reputation: 15
Complicated one: MySQL, rsync, remote machine, local machine


I have a small, vBulletin-based, aviation forum and I would like to download regular backups using rsync to my computer (I also backup within the server).

Now, I understand rsync downloads only the changes since the last download, which is something good because I get to save bandwith. Currently, I use this command to backup my database and store it in another directory within the same server, which is kind of stupid should the entire machine crash: mysqldump --opt -Q -u db_user -p db_name > public_html/directory/file.sql

That command backs up the entire thing and sends it over to a different directory. Now here's what I want to be able to do:

I need my computer to run on a scheduled task (I'm guessing cronjob) that downloads only the new parts of the file and adds them to the one it has on disk. Then, make a copy of it to another HD, just in case one of them goes kaput.

Is this even possible or am I asking for too much?

Remote machine is running CentOS, local is running PCLOS.
 
Old 02-27-2006, 10:45 AM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Yes/No and Maybe. What you want to do is definitely doable, but the “new parts” question about rsync may not work the way you expect.


Basically, almost anything you can do from CLI can be run as a cronjob, preferably through /etc/crontab.

See “$ man crontab” and “$ man 5 crontab” for more details about using crontab.


Rather than going through the details of using rsync and rsyncd here, it would probably be more useful to you to read through some of the rsync documentation here: http://rsync.samba.org/documentation.html

Specifically:

* rsync tutorial: http://everythinglinux.org/rsync/

* rsync man page: http://rsync.samba.org/ftp/rsync/rsync.html

* rsyncd man page: http://rsync.samba.org/ftp/rsync/rsyncd.conf.html

* setting up ssh to avoid password prompts: http://www.jdmz.net/ssh/
 
Old 02-27-2006, 12:14 PM   #3
daiver
Member
 
Registered: Oct 2003
Location: Uruguay
Distribution: PCLinuxOS
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks for your reply. I will look into it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
trying to copy files from another machine to the local machine using telnet,..how? shrike_912 Programming 6 03-14-2006 04:45 PM
rsync Syntax Question for Connecting to Remote Windows Machine Linux31 Linux - Networking 3 10-09-2005 02:55 PM
how to open a dilog on local machine when i do ssh to remote machine fahad26 Programming 3 05-03-2005 07:39 PM
How do I setup xwindow to run a remote desktop on my local machine through ssh. green-ears Linux - Newbie 4 11-04-2003 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration