mahiki / sde-path

learning how to be good enough for my current role
2 stars 0 forks source link

tar - backups tutorial #25

Open mahiki opened 9 years ago

mahiki commented 9 years ago

http://www.grymoire.com/Unix/Tar.html

This is essential for backing up your crap!

reconcile these notes to self:

rsync -dry-run option for testing before destructive writing.

They call it a backup, but it posts only synchronizes.  Delete or bad changes, files won't be recoverable.

Probably a cron job making tar files of directories is the way to go?  This will grow without limit, so deleting oldest be required.
Create tar file in backup disk
Compress with xz
If folder size > X AND number of tar files > 5 delete oldest tar file.

$ tar Jcvf mydir.tar.xz mydir