Results 1 to 3 of 3
  1. #1
    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.

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697

    Re: backup linux from window2000

    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.

  3. #3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •