Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.