Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Without using tar, I would like to backup my files from my ubuntu server to another external device, so that the files can be accessed without difficulty by a user using their windows pc i.e. dont have to use a restore program or untar files etc...
I have done this using the copy command which is executed by a cron job.
However if I would like to only copy files that have changed since the last copy (like incremental backups) how can this be done?
Also, is there a way of excluding files to copy - although I want to back everything up, I dont want to back up the files on the external storage or /proc, /tmp etc....
You can use rsync to do the copy. It will sync only changes on subsequent runs. And you can either explicitly include the dirs you want synced in a script or use the exclude [pattern] option.
There's loads of stuff on the 'net about backing up. A Google search will find plenty of information!
tar's a bit long in the tooth now and not best-of-breed except for simple requirements. I use dar which is Disk ARchiver as opposed to Tape ARchiver. Robust and powerful.
I don't know rsynch but understand it synchronises source and backup files -- which means a file deleted on the source system would also be deleted on the backup system. Fine until you find out a month later that it's been deleted and you want it back. Am I right rsync experts?
I don't know rsynch but understand it synchronises source and backup files -- which means a file deleted on the source system would also be deleted on the backup system. Fine until you find out a month later that it's been deleted and you want it back. Am I right rsync experts?
It will not delete on the receiver, files deleted on the sender, unless you explicitly tell it to. --delete-excluded
Thank you all for your helpful responses! I'm going to try writing a script which uses rsync. I was actually thinking of that, but just thought there may be a possibly easier way using the copy command, so I would only have to make minor ajustments to my existing script!
I don't know rsynch but understand it synchronises source and backup files -- which means a file deleted on the source system would also be deleted on the backup system. Fine until you find out a month later that it's been deleted and you want it back. Am I right rsync experts?
Only if you use the options "delete on destination"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.