Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Desktop to Server

  1. #11
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Desktop to Server

    Quote Originally Posted by grossinm View Post
    Excellent, new toys!

    Any advice on backing up? I have mounted my Time Capsule drive, and want to back it up to my server once a week or so.

    I'm looking at rsync now, but it looks a little daunting....
    I don't know about Time Capsules, but see here :
    http://tumblelog.slobodankovacevic.c...sule-in-ubuntu
    http://www.kremalicious.com/2008/06/...achine-volume/

    And about rsync, if you just want an up to date backup, then doing something like this is e.g. enough :

    Example backup to usb disk :
    Code:
    sudo rsync -avzu /home/ /media/usb-disk-1/
    Example making a backup from a remote machine :
    Code:
    sudo rsync -auvzC yourdomain.org:/var/www/ /usr/local/backups/www/
    Example using rdiff-backup to make incremental backups from a remote machine :
    Code:
    sudo rdiff-backup yourdomain.org::/var/www/ /usr/local/backups/incremental-www/
    See also this manual for example to run nightly backups :
    Code:
    man 5 crontab

  2. #12
    Join Date
    Jan 2009
    Location
    Albuquerque, NM
    Beans
    54
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Desktop to Server

    Here is the current status:

    I have Kubuntu 8.04 running in shell only.
    The local USB drive (which will be the destination folder) is attached via UUID mount to /media (and there is a Samba shared folder inside of it called Wolverine, but I'm guessing that is not important).

    The time capsule is mounted on the local system at /media/Capsule (done via FSTAB line //192.168.1.1/GMTC /media/Capsule cifs password=password,rw,iocharset=utf8,file_mode=0777 ,dir_mode=0777). so this basically shows up as a local drive on the Kubuntu system.

    So, I want to use rsync to copy the files from /media/Capsule/* to /media

    The only requirements I have are that the backups be performed on a scheduled basis, and that the backups are incremental.

    From my reading, it sounds like I need to edit the /etc/rsyncd.conf file and then create something called a cron file (no idea what this is.. other than a way of scheduling executions of jobs....)

    That's where I'm at.

    So, in your example, if I was to run rsync from the command line:

    sudo rsync -avzu /media/Capsule/ /media/Backup

    I would need to create the Backup folder (sudo mkdir ../media/Backup), and -avzu means archive, verbose, compress, skip files that are newer (or equal to?) on the reciever.

    My questions:

    compress, does this slow down or speed up the transfer? I am on a direct line from Kubuntu machine to Time Capsule (it is a router and hub as well as storage device)?

    archive: Not sure what this means in this context?

    Verbose, hopefully, when this is a scheduled job, it will report errors to a log file?

    and -u, does this create an incremental backup?

    Thanks (sorry for the long post)!

    reading cron manual now!

  3. #13
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Desktop to Server

    Quote Originally Posted by grossinm View Post
    sudo rsync -avzu /media/Capsule/ /media/Backup
    You want incremental backups, so let's try rdiff-backup instead of rsync.

    For using cronjobs I prefer to make a shell-script first, and add that to crontab.

    Here's an example script called /usr/local/bin/backup.sh
    (cron runs as root by default, no sudo needed) :

    Code:
    # example shell script /usr/local/bin/backup.sh
    mkdir -p /usr/local/backup/
    time rdiff-backup /media/Capsule/ /usr/local/backup/
    chmod 750 /usr/local/backup/
    Let's now add the cronjob for it :
    Code:
    sudo chmod 750 /usr/local/bin/backup.sh
    export EDITOR=nano
    sudo crontab -e
    Add a line like this :
    Code:
    30 1 * * * /usr/local/bin/backup.sh
    Save the file.
    This should start the backup half past 1 at night.

    Verbose, hopefully, when this is a scheduled job, it will report errors to a log file?
    By default cron will send you certain output by email, provided that you've set up a local mailserver (can be a very simple mailserver setup).

  4. #14
    Join Date
    Jan 2009
    Location
    Albuquerque, NM
    Beans
    54
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Desktop to Server

    I'm guessing that ensuring an accurate time on the system is important. What is the best way to keep the system time current?

  5. #15
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Desktop to Server

    Quote Originally Posted by grossinm View Post
    I'm guessing that ensuring an accurate time on the system is important. What is the best way to keep the system time current?
    There's ntpdate and rdate.
    Two little tools to set the time via the internet.

    http://www.debianadmin.com/keeping-y....html#more-248

  6. #16
    Join Date
    Jan 2009
    Location
    Albuquerque, NM
    Beans
    54
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Desktop to Server

    Ok, so the backup ran last night (and is still running 400+ gb).

    Let me ask a few questions: How do I exclude certain kinds of files from the backup?

    How does RDiff handle files that are in use during the backup?

    I will try the time server applications after the backup completes.

    Thanks

  7. #17
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Desktop to Server

    Quote Originally Posted by grossinm View Post
    Let me ask a few questions: How do I exclude certain kinds of files from the backup?
    Glance this through :
    http://www.nongnu.org/rdiff-backup/rdiff-backup.1.html
    http://www.nongnu.org/rdiff-backup/FAQ.html

    You can exclude device files and sockets, but that's perhaps not what you meant.

    If you have a lot of sub directories, then you can use rdiff-backup per directory, and having multiple destination directories, and with that, leave out the ones you don't want to backup.

    How does RDiff handle files that are in use during the backup?
    Not sure about that.

    I recommend that you test restoring *some* files after the backup is complete, to make yourself familiar with rdiff-backup.

    If you decide that you rather have a GUI based backup solution that can do incremental backups, then it's time to start a new thread.

    For my uncle's laptop I've tested a few GUI backup solutions, and I found them either to feature-rich, or too simple, or too confusing.
    But you might like them.
    Again, make sure you test restoring (part of the) backups, with whatever backup software you decide to use.

  8. #18
    Join Date
    Jan 2009
    Location
    Albuquerque, NM
    Beans
    54
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Desktop to Server

    I was under the impression that RDiff was making 1:1 copies of the files? Or are we compressing them into a TAR/GZ?

  9. #19
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Desktop to Server

    Quote Originally Posted by grossinm View Post
    I was under the impression that RDiff was making 1:1 copies of the files? Or are we compressing them into a TAR/GZ?
    Not 1:1
    rdiff-backup uses a different approach.

    I'm using rdiff-backup since years for backups at work.
    Whenever I need to restore something I need to read the manual again.
    It's not a matter of just browsing through files and find the file you need.
    You will need the restore option.

    If you prefer making incremental backups with rsync instead, it's possible.. but only with scripts.
    There are several webpages and projects which provide those.
    In that case you'll have the 1:1 copies, in different directories with data+timestamp in the name of the directories.

  10. #20
    Join Date
    Jan 2009
    Location
    Albuquerque, NM
    Beans
    54
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Desktop to Server

    So I am finally getting back to customizing the script.

    Can I enter a line into the backup.sh file for each location I want to backup to and its destination?

    Here is the script as I have it now:

    # example shell script /usr/local/bin/backup.sh
    mkdir -p /media/Media/Backup/ITunes
    mkdir -p /media/Media/Backup/Cabrera
    mkdir -p /media/Media/Backup/Videos

    time rdiff-backup /media/Capsule/ITunes /media/Media/Backup/ITunes
    time rdiff-backup /media/Capsule/Cabrera /media/Media/Backup/Cabrera
    time rdiff-backup /media/Capsule/Videos /media/Media/Backup/Videos

    chmod 750 /media/Media/Backup/ITunes
    chmod 750 /media/Media/Backup/Cabrera
    chmod 750 /media/Media/Backup/Videos

    Should consolidate each backup job? Are there mulitple steps here that can be combined?

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

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
  •