hard disk to hard disk backup

hi,

i'm running linux server. i want to backup the server everyday to another hard drive on the same machine. so that it transfers only the changes to the back up hard disk. how can i achieve this to create a robust backup solution.

thanks.
ajo_fodAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
alextoftConnect With a Mentor Commented:
Do you want to backup the entire server? Or just the data you store on it?

If it's just data you want to backup, you could knock together a simple shell script and call it daily at say 2am from the crontab.

#!/bin/bash
right_now=$(date +"%d-%m-%y")
tar -cvf /mnt/backupdrive/Docs.Backup.$right_now.tar /home/data
gzip /mnt/backupdrive/Docs.Backup.$right_now.tar

That will give you a nice compressed archive with the date in the filename. Plenty of more complex solutions if you want them. You could also incorporate a mysqldump into that aswell if you run any databases.
0
 
alextoftCommented:
Failure to RTFM. Only the CHANGES, so incremental backup.

Sounds like a job for rsync!
0
 
ajo_fodAuthor Commented:
thanks. i think the solution with tar might work for me.

what is RTFM? how can i use rsync?


0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
XoFCommented:
I think, this link might be very helpful for what you want to achieve:

http://www.mikerubel.org/computers/rsync_snapshots/

HTH,

-XoF-
0
 
xDamoxCommented:
Hi,

Why not setup software RAID?
0
 
XoFCommented:
hmm, software RAID isn't really a substitute for a backup solution. Or do you think of implementing RAID1, detaching the mirror and reattaching it once a day for syncing, then detaching it again?
0
 
pjedmondCommented:
FYI, RTFM is Read the f******** manual ;)

rsync is an excellent tool for incremental backups:

man rsync

for more info.

rsync -Cavz source destination

or even tunnelled via ssh (-e ssh) if the link is insecure, but as your drives are on the same system, the tunnelling is not necessary.

HTH:)   (Hope that helps)
0
 
ppfoongCommented:
0
All Courses

From novice to tech pro — start learning today.