Link to home
Start Free TrialLog in
Avatar of MrTV
MrTVFlag for Thailand

asked on

back up on linux fedora

I have 2 hardisks on linux fedora how can i back up  /home directory to another hardisk every day
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Phreonx
Phreonx

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 ;)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You're right. Should have specified:

cp -uRp /TargetHome /DestinationHome

Does that look better?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> .. texted based GUI
LOL, what do I need a GUI for if it is text based?
*SCNR*
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>LOL, what do I need a GUI for if it is text based?

..so that he can have lots of tabs;)
is one tab on the keyboard not sufficient? I'd be confused by multiple tabs :-))
xDamox, I guess you know how to read smileys ...