Find the answer to your Linux question:
Results 1 to 4 of 4
I've been looking for a backup software to backup a folder i have. I would like the file to be backed up once a day. And i can google it, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    4

    Easy backup solution


    I've been looking for a backup software to backup a folder i have. I would like the file to be backed up once a day. And i can google it, but there are so many different backup solution. all i want it to do is to zip a folder and replace it with the existing one on a FTP once a day.

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    If all you want to do is zip a directory (folder), the command below will do that including sub-directories.

    zip -r myfolder
    If you don't have any sub-directories you can use this:

    zip myfolder *
    If you want this run once a day, create a bash script and put an entry in cron for the time you want. You would need to add a cp or mv command to wherever you want this copied to.

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    14
    Quote Originally Posted by Knudn View Post
    I've been looking for a backup software to backup a folder i have. I would like the file to be backed up once a day. And i can google it, but there are so many different backup solution. all i want it to do is to zip a folder and replace it with the existing one on a FTP once a day.
    Everything you need is right on the command line.

    You have a lot of options you can even create a script to ftp or download the file once a day.
    My server for example takes mysql dumps every day and then zip's them up and rsync's the files to the remote backup server every night.
    I also have a script to clean up old backup files every X days to prevent disk space from filling up.


    Here's a script to do what you want.


    Code:
    #!/bin/bash
    if [ -f /tmp/backupfile.zip ];
    then
        echo "Removing backup file."
        rm /tmp/backupfile.zip
    fi
    echo "creating new backup file."
    zip -r /tmp/backupfile.zip  /foldername

  4. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    647
    Back in Time

Posting Permissions

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