Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner

Laptops
Promotional Items
Find Software
Best Price
KVM Switch over IP
Imprinted Gifts
Online Education
Compare Prices
Career Education
Disney World Tickets
PDA Phones & Cases
Promotional Pens
Laptop Batteries
Logo Design



internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article
Download: SQL Backup & DBA Best Practices eBook. Future Proof Your DBA Career and make the most of your office hours. Get this download now to learn how.

   LinuxPlanet / Reviews



  Rethinking the Datacenter
Sponsored by HP
Today's datacenters need to increase utilization, get control over power and cooling costs, and align with business objectives. Download this eBook to learn about the challenges facing the data center in a world where digital information is growing at a torrid pace and costs are being held in check. Learn more. »
 
  Putting the Green into IT
Sponsored by HP
Electricity use in data centers is skyrocketing, sending energy bills through the roof, creating environmental concerns and generating negative publicity. "Going Green" means looking to technologies like virtualization, energy-efficient chips and racks, and implementing policies that extend beyond the data center. Learn more. »
 
  Managing the Modern Network
Sponsored by HP
In a global economy where information crosses the globe in an instant, and where Web-based applications power business, it's more important than ever to ensure your network is safe from threats and optimized to deliver the data your business needs. »
 
  Evaluating Software as a Service for Your Business
Sponsored by Webroot
Is Software as a Service just hype, or is something really going on here? See if your company can benefit as SaaS tries to change the face of the enterprise. »
 
  Is Your Disaster Recovery Plan Good Enough?
Sponsored by HP
Preparing for a disaster is more often than not part of the storage planning process, and it is one of the most difficult tasks, since it includes local hardware and software, networking equipment, and a test plan. Learn how to get disaster recovery right. »
 
Linux Backups For Real People, Part 3
Simple Network Backups

Carla Schroder
Thursday, November 15, 2007 10:00:35 AM

In part 1 of this series we learned how to format USB storage devices for maximum portability, and how to configure udev so they would always have the same names when you plug them in, and in part 2 we learned a simple, efficient way to use the excellent rsync command for easy single-user backups.

Today we're going to create menu icons for launching our backups whenever we darned well feel like it, set up a simple network backup scheme, and create automatic scheduled backups.

First we'll take our rsync incantation from last week and enshrine it in a shell script, and give it an imaginative name like, oh, what about backupscript:

#!/bin/sh
##################################
# simple rsync script for making backups
# to a USB storage device, formatted in
# FAT16/32
##################################
# this must be one long unbroken line
rsync -rlvt --modify-window=1 --include-from=/home/carla/rsync-includes \
/home/carla/* /media/BACKUP1

If you are having trouble using include and exclude files, there is a simpler way: just list all the files and directories you want to backup like this:

rsync -rlvt --modify-window=1 \
/home/carla/thisdirectory \
/home/carla/thatdirectory \
/home/carla/filename \
/media/BACKUP1

You don't have to list them one per line; that's just how I like to do it. The backslashes tell Bash that you are spreading the command out over several lines. If you put it all on one line, be sure it's one long unbroken line.

Make your script executable:

$ chmod +x backupscript

Next: Making Menu Icons »

Skip Ahead

1 Simple Network Backups
2 Making Menu Icons
3 Automated and Network Backups
4 Troubleshooting and References





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers