If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Chit Chat > backup linux from window2000

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-10-03, 01:07
dieharrd dieharrd is offline
Registered User
 
Join Date: May 2003
Posts: 1
Question backup linux from window2000

I was wonder if anyone out there had any information about this.

I have both linux and windows2000 servers running. I was wondering if there is a way you can backup files/db/etc of a linux machine from a windows 2000 server machine? I want to have it scheduled to do this automatically daily.

If you have any ideas, or know where i can look. Much appreciated.
Reply With Quote
  #2 (permalink)  
Old 05-24-03, 22:47
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
Re: backup linux from window2000

Quote:
Originally posted by dieharrd
I was wonder if anyone out there had any information about this.

I have both linux and windows2000 servers running. I was wondering if there is a way you can backup files/db/etc of a linux machine from a windows 2000 server machine? I want to have it scheduled to do this automatically daily.

If you have any ideas, or know where i can look. Much appreciated.
First, get the 'curl' utility, and Read The Fine Manual. Second, check man mkfifo if you don't know what mkfifo does. Third, make sure you've got IIS running on your Windows box.

Code:
mkfifo somefifo.tgz

tar -czf somefifo.tgz /some/directory/* &

curl --upload-file somefifo.tgz --user username:password --url ftp://ftp.host.net/ &
The second and third commands should either be run in background or in separate terminals. If tar needs to run as root, sudo -b will do the trick.

You can put these in your crontab to have the Linux box automatically perform this backup. Check man crontab, man cron. Also poke around for a utility called "anacron" which will handle missed jobs.

The basic idea is that as tar is writing to the fifo (pipe), curl is reading from it and uploading. Curl is the only utility I've found that can upload, via FTP, from a pipe.

Another useful utility is 'wget' because it can mirror directories via FTP. If you're not worried about preserving symbolic links and timestamps, that might be the way to go.

A simple method would be to have a script that asks your DBMS to dump a copy of its data to a directory and then have wget mirror those data files, or you could stop the DBMS, mirror it, and then restart it.
Reply With Quote
  #3 (permalink)  
Old 05-24-03, 22:54
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
Also: since all that is going over FTP, it is not secure.

I haven't found a *simple* way of doing the fifo trick through an encrypted channel, but:

There is a free ssh client for Windows called PUTTy. It has an scp command. So you'll need to run 'sshd' on your Linux box, and you'll need to work out how to use 'ssh-keygen'.

Once you've got that working, you can use Window's 'at' command to schedule something like:

pscp -r linuxbox.com:/stuff_to_backup/* c:\backupdirectory\

Or whatever the precise syntax is.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On