Results 1 to 4 of 4

Thread: backing up Server automatically

  1. #1
    Join Date
    May 2013
    Beans
    11

    backing up Server automatically

    hi guys,

    my web-hosting server is up and running and do its job nicely

    the next task i want to perform is to have my server backup every 12 hours, does anyone know of any software that will do this? or how i would go about it?

    many thanks

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: backing up Server automatically

    Rsync via ssh for the win.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: backing up Server automatically

    Expanding a bit on Charles's correct but brief answer...

    Suppose your website is on www.example.com and stored in /var/www. At home you have a computer with a directory called /backup into which you want to write copies of the remote files. You can run:

    Code:
    cd /backup
    sudo rsync -av www.example.com:/var/www .
    That will create the directory /backup/www with copies of all the files and directories there. You'll need to have root privileges on the remote machine. The best method for setting that up is using public-key authentication in SSH so you don't need passwords. One other option to avoid passwords is running rsync in daemon mode on the server. Read the rsync man page ("man rsync" at the prompt) for details.

    Eventually when you have your backup configured to your liking, you would put the commands into a script and run it from cron.
    Last edited by SeijiSensei; May 14th, 2013 at 12:41 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: backing up Server automatically

    I have also found this page to be very helpful, and the man page is worth a read if you want to get into some of the different options rsync offers.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Bookmarks

Posting Permissions

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