Solved

back up on linux fedora

Posted on 2006-06-26
10
406 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
Comment Utility
man cron
man rsync
(rsync can be found at http://rsync.samba.org/ )
0
 
LVL 4

Expert Comment

by:Phreonx
Comment Utility
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
Comment Utility
cp is a very, very bad suggestion for backup 'cause it does not preserve links, and permissions
0
 
LVL 4

Expert Comment

by:Phreonx
Comment Utility
You're right. Should have specified:

cp -uRp /TargetHome /DestinationHome

Does that look better?
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
no
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 16

Assisted Solution

by:xDamox
xDamox earned 100 total points
Comment Utility
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
Comment Utility
> .. 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
Comment Utility
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
Comment Utility
>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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now