How to syncronize/backup my home directory?
Is there a switch for cp that will let me syncronize files between two locations? I want to backup the entire contents of my home directory on a daily basis but rather than doing a "blind" copy from point A to poin B, I want cp to mirror my home directory structure so that any files or directories that have been renamed, moved, or deleted will also be renamed, moved, or deleted at the destination.
I suppose I could rm -rf the old location before each copy but I'm hoping for a better solution. It doesn't have to be cp either. If there's some other command that will work better, that's fine too. I looked into tar'ing my home directory but I don't see any mirror/remove old files/sync options for tar either. |
If the purpose of this daily backups is because you installing a lot of software to try out and want to go backwards to a prev install can I suggest you check out an imaging system for linux.
www.partimage.org but, once you enter into the dark world of imaging, you won't want to stop with just your home, you will want to do others , heh heh |
I'll check out the link you provided. My reason is for wanting daily backups but not because I install a lot of software. I just want to make sure I have all my bookmarks, e-mail, desktop settings, downloads, and so on backed up regularly because all of that stuff changes daily. I could be more selective with my choices and only copy the things I need but hard-drive space isn't a problem and I'd rather have 50MB of worthless backups than miss 100K of something vital.
|
I would say this could be a two part operation, one mirroring the data (rsync comes to mind for that), and the other part would be storing the mirrored data, I would say maybe in a tar file.
look also at cpio as a solution. |
All times are GMT -5. The time now is 05:01 AM. |