Solved

back up on linux fedora

Posted on 2006-06-26
10
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

 
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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

726 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