ftp backup script - Linux

This is a discussion on ftp backup script - Linux ; Hi I am trying to setup a bash script to tar a bunch of directories, then gzip them and move them to a specified home directory so that I can login and download it through SSH. Here's an outline 1. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: ftp backup script

  1. ftp backup script

    Hi I am trying to setup a bash script to tar a bunch of directories,
    then gzip them and move them to a specified home directory so that I
    can login and download it through SSH.

    Here's an outline

    1. Tar all mysql databases.
    2. Tar all home directories
    3. Tar /etc/ directory
    4. Tar other needed directories.

    5. GZip each of the tar files into one tar.gz file and move them to
    /home/duser/backup
    6. Then I'll login and download a single tar.gz file to burn to dvd or
    cd as a backup.

    7. I'd also like to set this up to ftp the tar.gz file to a separate
    server, but for now I just wnat to get the cron job setup to make
    tar.gz files of what I need to backup.

  2. Re: ftp backup script

    jgoddard wrote:
    > Hi I am trying to setup a bash script to tar a bunch of directories,
    > then gzip them and move them to a specified home directory so that I
    > can login and download it through SSH.
    >
    > Here's an outline
    >
    > 1. Tar all mysql databases.
    > 2. Tar all home directories
    > 3. Tar /etc/ directory
    > 4. Tar other needed directories.
    >
    > 5. GZip each of the tar files into one tar.gz file and move them to
    > /home/duser/backup
    > 6. Then I'll login and download a single tar.gz file to burn to dvd or
    > cd as a backup.
    >
    > 7. I'd also like to set this up to ftp the tar.gz file to a separate
    > server, but for now I just wnat to get the cron job setup to make
    > tar.gz files of what I need to backup.


    Use mysqldump. Don't backup databases with a file system
    dumper, such as tar!

    What was your question, by the way? .

    I personally would use scp (or Winscp to a Winders system).
    Much more secure!

    Have a look at this. I put "mysql" and "backup" into Google
    and this was the first item!

    http://www.desilva.biz/mysql/mysqlbak.html

    Cheers.

    Cliff

    --

    Barzoomian the Martian - http://barzoomian.blogspot.com

  3. Re: ftp backup script

    On Sun, 13 Mar 2005 16:41:35 -0800, jgoddard thoughtfully wrote:

    > Hi I am trying to setup a bash script to tar a bunch of directories, then
    > gzip them and move them to a specified home directory so that I can login
    > and download it through SSH.
    >
    > Here's an outline
    >
    > 1. Tar all mysql databases.
    > 2. Tar all home directories
    > 3. Tar /etc/ directory
    > 4. Tar other needed directories.
    >
    > 5. GZip each of the tar files into one tar.gz file and move them to
    > /home/duser/backup
    > 6. Then I'll login and download a single tar.gz file to burn to dvd or cd
    > as a backup.
    >
    > 7. I'd also like to set this up to ftp the tar.gz file to a separate
    > server, but for now I just wnat to get the cron job setup to make tar.gz
    > files of what I need to backup.


    And your question is???

    My comments:
    1- That is a lot of files and space to backup, tar, gzip and ftp

    2- I built a script that uses "find" command with a list of files and file
    types to find then sort unique writing the output to a list. The script
    uses that newly created list as input to a tar command and tars all the
    files on the list into a gzipped tar file appending the julian date to
    make the tgz file unique.

    3- You can cdrecord the tar files to cd or dvd once you setup the tar
    manually leaving a cd/dvd in the writer after you mkisofs the ftp
    directory.

+ Reply to Thread