Solved

back up on linux fedora

Posted on 2006-06-26
10
437 Views
Last Modified: 2013-12-06
I have 2 hardisks on linux fedora how can i back up  /home directory to another hardisk every day
0
Comment
Question by:teera
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 150 total points
ID: 16990113
man cron
man rsync
(rsync can be found at http://rsync.samba.org/ )
0
 
LVL 4

Expert Comment

by:Phreonx
ID: 16990256
Hello,
write a small script that copies only the diffs and create a crontab as ahoffmann suggested. The script will be executed as often as you define in the crontab. It will take considerably more time to complete the first time because it will copy the entire /home tree but after that completion times will reduce. Here's the script:

#!/bin/bash
# ScriptName: DailyBackup
cp -uR /TargetHome /DestinationHome

-u: Copies files only when the source file is newer than the destination or when the destination file is missing.
-R: Process (sub)directories recursively

Make DailyBackup executable:

chmod 700 DailyBackup

To edit your crontab files type:
crontab -e

0 14 * * * /path/to/DailyBackup

Your script will get executed everyday at 1400h. Modify the time as suited

Hope that helped ;)
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 150 total points
ID: 16990320
cp is a very, very bad suggestion for backup 'cause it does not preserve links, and permissions
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 4

Expert Comment

by:Phreonx
ID: 16990338
You're right. Should have specified:

cp -uRp /TargetHome /DestinationHome

Does that look better?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16990401
no
0
 
LVL 16

Assisted Solution

by:xDamox
xDamox earned 100 total points
ID: 16990915
Hi,

I would recommend rsync as ahoffmann said also you can use part image

http://www.partimage.org/Main_Page

Part image has a texted based GUI and is excellent for backups it uses the dd method but does not copy empty nodes.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16991152
> .. texted based GUI
LOL, what do I need a GUI for if it is text based?
*SCNR*
0
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 100 total points
ID: 16993538
As ahoffmann said - rsync is the way to go.

Edit the crontab to add something akin to:

0 14 * * * /usr/bin/rsync -Cavz /home /bu/folder

(   (()
(`-' _\
 ''  ''
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16993548
>LOL, what do I need a GUI for if it is text based?

..so that he can have lots of tabs;)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16995873
is one tab on the keyboard not sufficient? I'd be confused by multiple tabs :-))
xDamox, I guess you know how to read smileys ...
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle 10g standard edition server with 4 processors 3 67
AWS ELB 5 95
VMware Tools Install On Linux Problem 3 83
Redhat upgrade 1 25
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question