Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
I would like to avoid RAID + to have a simple way.
Code:
> cp -r -u /home /mnt/backup # could work but unreliable
> the rsync way # sometimes it can fail with persmissions (e.g. some weird cases), less reliable
> others ?
Any input would be helpful
Thank you !!!!!
Click here to see the post LQ members have rated as the most helpful post in this thread.
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.
rsync will only delete files if you specify one of the delete options. Never had problems with that.
Quote:
> the rsync way # sometimes it can fail with persmissions (e.g. some weird cases), less reliable
I see it only have problems when you copy files to a filesystem that doesn't support Unix file permissions, like FAT or NTFS.
Quote:
I would like to avoid RAID
RAID is in no way a backup solution, its intention is to keep downtimes short in case of hardware failure.
Quote:
> cp -r -u /home /mnt/backup # could work but unreliable
Why do you think that this is unreliable?
Quote:
> others ?
There are some programs for that (came up with that after a short websearch), but I prefer rsync and it never has failed for me.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Quote:
Originally Posted by TobiSGD
but I prefer rsync and it never has failed for me.
+1
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.
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.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
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.
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.
cp -rd does delete the target if files are not existing anymore on the source?
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?
I wrote cp -rp not rd. And that is for restoring from the backup. Anyway because you have multiple incremental backups the --delete option is not a problem. For example say you have rsync running and you have it setup as follows:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.