Find the answer to your Linux question:
Results 1 to 5 of 5
I didn't really know where I was to write this post....but I hope Il get help... I got a server that I want to have a bakup system on. The ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    Sweden
    Posts
    5

    Backup to disk


    I didn't really know where I was to write this post....but I hope Il get help...

    I got a server that I want to have a bakup system on. The server got hotswap disks and I want to have work like this.

    I got 1 disk on the server (36Gb) with my files on.
    1 disk (300Gb?) that have the directories monday, th.. and so on (the 5 working days)

    Let say its monday.

    - I insert the 300Gb disk in the hotswap
    - Linux automatically mounts the disk
    - The app deletes all the files in the monday directory
    - The app copies all the files from my 36Gb directory (/home/) to the 300Gb disks (/monday/) directory
    - The app prints a report of some kind to a printer
    - The app unmounts the disk
    - I take out the disk when I see the report and put it in a safe place..


    I hope I made my mind clear...
    Are there any program for this kind of work...or can I script it??
    Then how do I make a script to start after the disk is mounted??

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    Of course you can get this working!
    I'm no expert here, but if you want it done the exact way you said,
    create a bash file that would :
    • Mount
      delete the backup with todays date -7
      cp /home -rv -f /bck/date (something like that)
      dont know if cp command can have something like an ouput param like >> to some file so you get a file that prints the ouput...
      umount

    I must tell you that this isnt a good way thou... (anyway I dont think it is, with my limited knowledge I could be wrong)
    Mabye someone better as a genius idea
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    If you didn't care about having a date-oriented backup, you could use rsync to sync the two folders. This scans and compares the access times of all the files, replacing those on the destination with times older than those on the source.

    http://rsync.samba.org
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. #4
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    Quote Originally Posted by sarumont
    If you didn't care about having a date-oriented backup, you could use rsync to sync the two folders. This scans and compares the access times of all the files, replacing those on the destination with times older than those on the source.

    http://rsync.samba.org
    Nice didn't know... thanks for the tip sarumont!
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  5. #5
    Just Joined!
    Join Date
    Jan 2005
    Location
    Sweden
    Posts
    5
    Thanks both of you!!

    but sarumont how do I get the bash file to execute when the harddrive is inputed to the hotswap space??

Posting Permissions

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