A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...
I had a really bad SSD drive that had many sectors go bust. Although overall the drive was still quite functional, the number of sectors going bad was growing pretty quickly (from like 100 it quickly jumped to 1,000).
So I decided to replace the drives and as I was doing so, I also wanted to have a full backup of my /var directory. That includes databases and some other really large files. So to do the copy, I wanted to use rsync for two reasons, it is capable of restarting a copy in case it fails in the middle (imagine a copy that takes 12 hours... what are the chances that something breaks in between?)
So I used the following command:
sudo rsync --partial --info=progress2 -a /var /var2
The /var2 is a mount point on a different HDD than the /var HDD.
The command uses the following options:
This has proven to be very useful and quite sufficient.
If you want to make constent backups, especially if it includes /var/log. you may want to consider deleting files that were removed in the source. This is done with the --delete option. There are a few variations of that option to delete before, after, during the transfer. If your copy is done at regular interval, the variations probably do not matter as much.
Recent Posts on The Linux Page: