On Fri, 24 Jan 2020 19:57:06 -0800
John Jason Jordan <[email protected]> wrote:

> Today the adapter to use my 1TB SSD in my new laptop arrove, and I
> have it installed and mounted. So now I want to make some changes to
> the way I do backups. A little preliminary info re my motivations
> will be helpful.
> 
> I bought my very first computer in 1978, and ever since I have *never*
> lost data due to a hard drive failure. Yes, I've had drives fail a
> couple of times, but that the failure was imminent was always obvious
> in plenty of time for me to make sure that my data was safe. And
> these days all my drives have SMART data, which I check every few
> months or so. Therefore, I have always followed the policy of making
> full backups only when I am about to do something serious - like a
> dist-upgrade or such.
> 
> While I have never lost data due to a drive failure, at least once
> every few months I accidentally delete a file that I shouldn't have.
> This is exactly the problem that using Trash was supposed to
> alleviate; i.e., you move it to the Trash instead of deleting it.
> It's been a decade and a half since I used Windows, but that is
> always what I used to do. Windows would not count the Trash as real,
> and if I needed the space for a file save, it would make the space by
> deleting the oldest files in the trash. Well, that's not how Linux
> seems to do things. Imagine my surprise one day while new in my use
> of Linux when I got an error message that a file could not be saved
> because I was out of room. I thought I had hundreds of GB of free
> space, so I was sitting there going 'WTH'? Ever since I have just
> never used the Trash.
> 
> But now I am considering setting up a cron job to do backups to the
> 1TB SSD. I didn't do this before because my old computer had only 512G
> for / and /home, and I often needed the SSD for storage. My new
> computer has a 1TB NVMe for / and /home, and each partition is only
> about 30% used, so I no longer need the SSD for storage.
> 
> The SSD is always mounted at /media/jjj/Data, set up in fstab. So I am
> thinking of creating two folders on it, Root and Home, and create cron
> jobs something like this:
> 
> 0 3 * * * rsync -avx --delete / /media/jjj/Data/Root
> 0 3 * * * rsync -avx --delete /home /media/jjj/Data/Home
> 
> I probably haven't got the syntax quite right, and there may be things
> in / that shouldn't be backed up. And I should probably make the
> second one start half an hour later or so, or combine them somehow.
> (Cron scares me; it was written for people far smarter than me.)
> 
> Added thought: This does not need to be a clone of the partitions with
> dd or such. I just want to be able to recover a single file or folder
> that I shouldn't have deleted.
> 
> Suggestions welcome!
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug

For a backup solution like that I would recommend using Restic instead
of Rsync. You get compression, deduplication, encryption, snapshots,
and snapshot removal policies. Read more about it here
https://restic.net . The funny thing about hard drives is that they
never seem to fail until you don't have a backup of them somewhere
else. So best keep backing up so those drives don't get sneaky.

Also there any many more reasons to backup. Disk rot for one. Unless
your using a checksumming filesystem like ZFS with a redundant mirror
your data is subject to silent corruption. You may not even notice this
until many years later. I for one have noticed it as 2 music files over
the years in my archive 1 of them the hash of the PCM audio data
changed and I didn't know why so I restored that file from backup. the
other stopped playing in all players so I restored it from backup.
Since I moved it to ZFS that has not been a problem and I've done
weekly scrubs. Restic also protects against to some degree with it's
crypto and integrity checking of every block.

Restic will also speed up your backups because one you do your first
backup, de-duplication kicks in and you don't have to write data to
your backup disk for files that have not changed.

Another thing to consider is what happens if there is a natural disaster
at your home such as a fire, or your home gets broken into and steals
your computer as well as all your backup disks.

-- 
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to