e-mail   
 Menu
  Home
  Download
  Top 10 Downloads
  Last 15 New Files
  Web Links
  Tips
  Last 15 New Tips
  NLM Programming
  Admins Club





SUPLA System
Internet of Things




Installation and Administration






Polish Forum SUSE


 
Who's Online

 There are currently,
23 guest(s)
that is (are) online.
 


Technical Information

Back to List of Categories

Technical Information about
  A Little YaST Magic
  A Slideshow for Your KDE Wallpaper
  Add Novell Support to Your Firefox Search Engine
  Adding To The Panels In Gnome.
  Akregator - RSS News Reader
  An Introduction to WBEM and OpenWBEM in SUSE LINUX
  Authenticating SUSE LINUX to eDirectory via LDAP
  Basic Mounting Differences between Windows and Linux
  Beginner's Guide to Using Novell SUSE LINUX's Build Utility
  Browsing Files
  Card Readers on SUSE LINUX 9.2 Professional?
  Changing the Default Browser in Gnome
  Developing Perl CGI scripts on SUSE LINUX
  Do I Have Permission?
  Double SYNC -- Using RSYNC Simultaneously With and Without Branch Office for Data Backup
  Dumb Question: Mounting Linux CDs
  Easy Command-Line Introduction
  Easy Way to Debug SSL Connections
  Enabling an Interactive Startup in Novell/SUSE LINUX
  Exploring MySQL 4.1 and PHP 5 on SUSE LINUX
  Extend Your Panels Using Gnome Drawers.
  Firefox Speed Tip
  Fix Java Errors With ConsoleOne On Linux
  Fix Your Mouse Wheel...
  Gimp -- Closing In on Photoshop...
  Gimp Tips Part 1: Resizing Images
  Gimp Tips Part 2: Rounding Corners
  Gimp Tips Part 3: Fading Photography Edges
  Gimp Tips Part 4: Selective Colorization
  Gimp Tips Part 5: Plugins a Plenty - Adding Light
  Gimp Tips Part 6: Using The Clone Tool
  Google Auto-fill Replica for Linux
  How a Corrupted USB Drive Was Saved by GNU/Linux
  How to Implement Login Scripts into a Pure Linux Environment
  How to install and connect an External Modem on a Linux PC
  How to Install the Novell Client for Linux on SUSE Linux 10.0
  How to launch applications at login in Gnome
  How to Remote Control Linux
  How to setup a Linux application to automatically startup when you login.
  How to share Files and Printers Between Linux and MS Windows with Samba
  How to uninstall the Novell Client for Linux
  How to upgrade the Novell Client for Linux
  How to use SMB without turning off the firewall
  How's the Weather?
  HTML Development Tools in Linux
  Informative Bash Prompt
  Install and Use QEMU on SUSE 9.2
  Install Linux Frequently, Without the Hassle
  Installing Apache, PHP, and MySQL on SUSE LINUX Professional
  Installing RPM Files
  Integrating Novell Linux Desktop into a Novell NetWare network
  Introduction to Oracle 10g R1 (10.1.0.3) on SUSE LINUX Professional 9.3
  iPrint Printers on Novell Linux Desktop
  Linux Scheduling Priorities Explained
  Make a Misbehaving Program Quit
  Manually Mounting a USB Flash Drive in Linux
  Migrating To Linux, Advantages Over Windows 9.x And XP
  Minimize Your Maximizing with Multiple Desktops
  Mounting NetWare Volumes On NLD Illustrated
  Move Your /home to Another Computer
  Mozilla Mail Review
  Need a Backup?
  Novell Client Settings with Windows Terminal Server
  Novell Linux Desktop Equivalents of Windows Software - New and Improved
  Novell Linux Desktop System Upgrade How-To
  Partitioning Hard Drive for Linux Install
  Perform Remote SuSE Installations With Virtual Network Computing
  Quick Intro to Klipper
  Quick Shortcuts in The Gimp
  Reset Your Lost Root Password
  Resizing Your Gnome / KDE Panels
  Runlevels in SUSE LINUX
  Running Existing Win32 Applications on SUSE LINUX
  Service Command in /etc/init.d/
  Setting Shortcut Keys
  Setting up a Linux NFS Install Source for Your LAN
  Should I choose Novell Linux Desktop or SUSE LINUX Professional as my desktop?
  Starting Services From the Command Line On SuSE LINUX
  Sticky Notes for Gnome
  SUSE LINUX 9.3 Professional Review
  Sync Up The Taskbar and the Desktop in Gnome
  System Upgrade How-To
  Taking Screenshots in Linux
  The Basics of Messaging in the Cross-Platform GroupWise Client
  The Novell Client for Linux (beta).
  Transparent Panels in Gnome
  Trick Out Your KDE Desktop
  Understanding the YAST Software Module Options
  Updating Your Software with Red Carpet
  Using dsbk on Linux and Unix
  Using iFolder to Synchronize Firefox Bookmarks
  Using Multiple Swap Partitions In 2.4
  Using openSSH to Securely Access Remote Systems
  What FTP client should I use on Linux?
  What Is Logical Volume Management?
  What is so great about Firefox?
  Which Graphic Formats For What?
  Windows Shortcuts for Firefox Tabs on Linux
  Windows to Linux: A Beginner's Guide
  Windows Users Can Feel at Home Exploring Files in Linux
  WLAN interface as the Default
  Work With User Selection Icons In KDM
  YAST Online Update De-Mystified

Technical Information
 Need a Backup?

Printer-friendly version

Posted: 30 Mar 2005

I recently became concerned with the increasing number of important files I store on my computer. I rarely back anything up, and with the number of aspects of my life I'm converting to be stored on my computer constantly growing, a hard-drive failure would certainly be disastrous.

I considered trying the normal "cp" command to copy the contents of my drive to a separate drive, but that only worked once. In order to back up the drive again after adding content, I had to copy the *entire* drive again - cp wasn't smart enough to know what was all ready backed up and what needed backing up.

To remedy this situation, I found a nifty little program called rsync. It was a perfect solution.

*note* rsync is a program that is quite flexible, and can do *much* more than is presented in this article. If you're interested in learning more of rsync's capabilities, please open a console and type "man rsync". The manual page is kind of technically written, so be prepared.

Now, what rsync does is really quite cool. It intelligently backs up information from a source to a destination. In my case, it backs up the entire contents of one local hard drive to another hard drive.

Now, when I said intelligently, I meant it only backs up what is needed. If I have 30 gigs of stuff I backed up a month ago, and 5 gigs of new stuff that needs to be backed up from the same drive, mingled throughout the same directories - it knows not to backup the old stuff, and successfully backs up the 5 gigs of new material. Cha-ching!

You may be asking "What's the catch here? This is too good to be true!" Well, unless you're very comfortable with the Linux console, there is a catch. There's currently no GUI for this process, which means you'll have to do a bunch of typing, instead of clicking to get the job done.

how to get set up

This article assumes you've all ready got your 2nd hard drive bought, installed, and mounted.

Once you've readied your 2nd hard drive - continue reading.

*note* You don't necessarily need a 2nd hard drive for this to work. You can use many different things, but this article will assume you're working with a 2nd hard drive.

how to back up your hard drive using rsync

In order to make this more user-friendly, many examples will be used. The examples will have directories that pertain only to my personal situation. You'll have to change the directories for your particular setup.

The process is as follows:

Open a console window and type in the following, but don't press enter yet:

rsync -avnu --progress --stats


I think it'd help a bit if I explained what all that means, so....
  • "rsync" means "run the rsync program"
  • "-a" means "Backup all sub-directories maintaining all permissions, groups, users, times, and devices."
  • the "v" after the "a" means "Be more verbose. Tell me more about what's going on."
  • the "n" after the "v" means "Don't actually do anything, just tell me what you're going to do."
  • the "u" after the "n" means "Only update stuff. Don't re-copy things with more recent timestamps."
  • the "--progress" means "Give me progress updates while you're backing things up."
  • the "--stats" means "Let me know exactly what you did after it's all done."
And that's the first part.

I'm kind of paranoid about my stuff being copied correctly, so I probably go beyond what most people would want to do, but better to be safe than sorry, right?

Now, to continue, you want to input the directory of the mounted drive you want backed up. In my case it's "/stuff/music/" so my command line would look like this:

rsync -avnu --progress --stats /stuff/music/


The last step is to put in the mounted directory of the hard drive you're backing up to. In my case it's "/backup/music/" so the next section would look like this:

rsync -avnu --progress --stats /stuff/music/ /backup/music/


And that should do it for the test run.

*note* If you are backing up anything with sub-directories, it is necessary to include the trailing "/" characters on the end of the directory, e.g. "...music/"

When the program finishes, you'll notice a lot of information on your screen. It'll probably look something like this:

receiving file list ...
6290 files to consider
10957953343edde93f07f77-1.png
10957953343edde93f07f77.png
Firefox_wallpaper.png
flacs/EnZign/EnZign - Such Is Life.flac
flacs/EnZign/EnZign - That We Might Live.flac
flacs/EnZign/EnZign - When Hope Is Lost.flac
flacs/Original EnZign/The River Of LIfe.flac
flacs/Original EnZign/With All My Might.flac
flacs/Original EnZign/On My Way.flac
flacs/Original EnZign/What Lies Beyond.flac
flacs/Original EnZign/Im Cryin.flac
flacs/Original EnZign/Eternal Love.flac
flacs/Original EnZign/Chosen.flac
flacs/Original EnZign/Good Things Come From Above.flac
flacs/Original EnZign/Jenny.flac
flacs/Original EnZign/Enzign.flac

Number of files: 6290
Number of files transferred: 16
Total file size: 111688283491 bytes
Total transferred file size: 398411470 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 296298
Total bytes written: 80
Total bytes read: 296378

wrote 80 bytes  read 296378 bytes  20445.38 bytes/sec
total size is 111688283491  speedup is 376742.35


If you notice, rsync found 6290 files to back up, but it only set 16 to actually be backed up. Those 16 files are ones I updated this morning, and happened to be the only ones that were needing to be backed up.

Everything looks good...

Now, if the output looks right, go ahead and run the real thing by taking out the "n" option and pressing enter.

rsync -avu --progress --stats /stuff/music/ /backup/music/


That will start the process and you'll see the progress as it happens. When it's done, you should have a shiny new back-up, ready to come to the rescue!






Since 2003

Portal posiada akceptację firmy Novell Polska
Wszystkie materiały dotyczące produktów firmy Novell umieszczono za zgodą Novell Polska
Portal has been accepted by the Novell Polska
All materials concerning products of Novell firm are placed with Novell Polska consent.
NetWare is a registered trademark of Novell Inc. in the United States and other countries.
Windows is a trademark or a registered trademark of Microsoft Corporation in the United States and other countries.
Sybase is a registered trademark of Sybase Inc. in the United States of America.
Other company and product names are trademarks or registered trademarks of their respective owners.