Automated backup of sites (& db's) to smb:// share

Discussion in 'General' started by woleium, Oct 23, 2006.

  1. woleium

    woleium New Member

    Has anyone written a script to perform automatic nightly backup of sites, complete with db's? Ideally it would perform an rdiff's and allow for versional restores (i.e. restore site to state from a week last thursday)

    If not then I'd be happy to help writing one. If i get the script set up and working & running from a config file perhaps spmeone could integrate it into the gui?
     
  2. sjau

    sjau Local Meanie Moderator

    Well, I have written an incremental snapshot-style backup howto with rsync :)

    However there is no snapshot-style backup howto for rdiff yet - but Falko has written a guide on howto mirror a site with rdiff. Maybe you can use this as base for your howto with rdiff :)
     
  3. woleium

    woleium New Member

  4. edge

    edge Active Member Moderator

    woleium,

    If you ever get it going I would love to have a copy of that script :)
     
  5. sjau

    sjau Local Meanie Moderator

    btw, my tutorial can be simply changed to make backups on local media also.. then you won't even need the SSH part :)
     
  6. sajo

    sajo New Member

    Can you explain how to, for us newbies.
    Thanks for great job
     
  7. falko

    falko Super Moderator Howtoforge Staff

    What exactly is the problem? To which tutorial are you referring?
     
  8. sajo

    sajo New Member

    Actualy there isn't any problems, yet.

    I read this HOW TO http://www.howtoforge.com/rsync_incremental_snapshot_backups and its great and the SJAU say that this can be used also with local drives without SSH and I would love to know how to doit or what part of tutorial to skip or change. Because I intend to use second hard disk only for backup I need something for backing up the system.
     
  9. sjau

    sjau Local Meanie Moderator

    just leave away the ssh part.... and rsync basically works like this

    Code:
    rsync FROM TO
    
    this means you could do:

    rsync /home /mnt/hdb1

    Here's a couple more scripts :)
     
  10. sajo

    sajo New Member

    Thanks so I can do

    rsync /var/www /mnt/hdb1/backup
    rsync /root/ispconfig /mnt/hdb1/backup
    rsync /home/admispconfig /mnt/hdb1/backup
    .
    .
    .
    For every folder I need?
     
  11. sjau

    sjau Local Meanie Moderator

    Yes you could do that... however I would operate with an exclude list and have the root folder backupped and then define excludes like:

    /mnt/hdb1/backup/
    /tmp/
    /proc/
    ....
     
  12. statiic

    statiic New Member

    Their must be an better way then submitting all the folders you need.

    If I want to backup the whole drive. How does that go, because just backing up these folders will leave out an lot of important settings.
     
  13. sjau

    sjau Local Meanie Moderator

    yes, or you could use include resp. include-from-file... to run rsync only once...
     
  14. statiic

    statiic New Member

    Is their an possibility that you can write an small tutorial for mandrake users to backup their perfect setup.
    But ispconfig makes an lot of settings when you submit an new client. And I have no clue what files I all need to backup.
     
  15. sjau

    sjau Local Meanie Moderator

    I don't have mandrake... but rsync should be the same on all systems you just need to say what you want to backup with include or include-from-file and/or what you do not want to backup with exclude or exclude-from-file...

    Why don't you just give rsync a try and try to figure out yourself?
     
  16. statiic

    statiic New Member

    BEcause I'm an noob to linux and have no clue what I exactly should backup.

    Like web files, mail files, mysql db. I have no clue where to search for this.
     
  17. sjau

    sjau Local Meanie Moderator

    Bein a noob is not an excuse for not trying to acutally understand...

    And as I don't know how you build your system and where you put everything I cannot help you telling what you need to backup...
     
  18. statiic

    statiic New Member

    I used an perfect setup tutorial and I already tryed rsync before I asked ;)
    I couldnt figure it out and I rather ask then before I mess up my whole installation.

    So I used the Mandrake 2007 perfect setup. I havent changed any file locations.
    I also included ispconfig.
     
  19. statiic

    statiic New Member

    Another thing where can I find my second harddrive??

    I have installed everything on my sata harddisk which is called sda1. With partions sda5 and sda6.

    Now my ata harddriva is called hda1, but where can I find it? Did it merged with my sda1 harddrive? So they make 1 drive together or does it have an special folder?

    Its not in the /mnt/ folder. Only my cdrom and floppy drive are in there.
     
  20. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/fstab?

    I think it's a good idea to back up /etc and /var as these are the most important directories. If you don't have your web sites in a subdirectory of /var, you must also back up the directory where your web sites are in.
     

Share This Page