Backup regularly the /home?
Hello,
I have a very simple question, which is actually a pretty difficult one. It has lot of dependencies ;) if you know what I mean ;) For the moment, I use. I dont like it much because rsync could be deleting the deleted files of the real /home. However rsync could fail time to time, I have experienced. Code:
0 0 * * 5 root cd ; touch /forcefsck I would like to avoid RAID + to have a simple way. Code:
> cp -r -u /home /mnt/backup # could work but unreliable Thank you !!!!! |
I would tar it up and apply a date stamp...
Code:
DATE=`date +%...` |
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
Using USB hard disks for complete disk mirroring. A real no-brainer. On critical machines I make a daily backup, but swap the USB disk with one off-site weekly. jlinkels |
Use rsnapshot instead of just rsync. Rsnapshot is a collection of perl scripts that allows you to maintain incremental backups spanning multiple time periods using rsync. This way you can have daily, weekly, and monthly backups. It uses symbolic links extensively so disk space usage is minimized. I wrote a guide on how to use rsnapshot if you are interested.
|
I am not sure yet I want anything else but a verbatim copy of my data, but OTOH being able to roll back changes is valuable as well. Without using a tape rotation scheme. It has happened before that I overwrote my backup before I restored files from something stupid I did. I am going to look in it further. Thanks for posting.
jlinkels |
Just want to add that the if you use rsnapshot you won't have to worry about what happens if a backup fails. In such an event two things will happen:
- Cron will inform you that the backup failed - The next time rsnapshot runs it will automatically roll over the failed backup. That is it will delete it and go back to the last successful backup. So you won't loose backups just because the power went out or something like that. |
And BTW the snapshots rsnapshot makes are copies. You can copy them back to your home directory or anywhere else using cp:
Code:
cp -rp daily.0/home/user/* /home/user/ |
Quote:
rsync sometimes miss files, and does not like fat32, and sometimes is not so accurate what would be the alternatives to rsync that would work better with --delete option like? |
Quote:
7 daily backups - daily.0- daily.6 4 weekly backups - weekly.0 - weekly.3 3 monthly backups - monthly.0 - monthly.2 So you now have backups that go back 3 months. If you delete a file and a backup is made only your latest backup is spoiled i.e. daily.0. You can still recover the file from backups daily.1-6 and any of the weekly or monthly backups. Anyway if you don't like rsync you can always use tar or some other method. It's entirely your choice. |
I could give you some reading for backup with TAR here
if you want this solution |
All times are GMT -5. The time now is 11:07 AM. |