Using rsync for backups, because it's not shiny and new
You might not even like rsync. Yeah it's old. Yeah it's slow. But if you're working with Linux you're going to need to know it.
In this video I walk through my favorite everyday flags for rsync.
Support the channel:
patreon.com/VeronicaExplains
ko-fi.com/VeronicaExplains
thestopbits.bandcamp.com
Here's a companion blog post, where I cover a bit more detail: vkc.sh/everyday-rsync
Also, @BreadOnPenguins made an awesome rsync video and you should check it out:
Lastly, I left out all of the ssh setup stuff because I made a video about that and the blog post goes into a smidge more detail. If you want to see a video covering the basics of using SSH, I made one a few years ago and it's still pretty good:
Chapters:
1:18 Invoking rsync
4:05 The --delete flag for rsync
5:30 Compression flag: -z
6:02 Using tmux and rsync together
6:30 but Veronica... why not use (insert shiny object here)
reshared this
mausmalone
in reply to vkc via PeerTube • • •John Socks
in reply to vkc via PeerTube • • •Nimona RESISTS
in reply to vkc via PeerTube • • •rsync is great for syncing 2 directories. Have you heard of rsnapshot? It's a perl script that runs rsync, and uses hard links (if available) to have multiple old versions available. You can have an hourly backup, a daily backup, a weekly backup, and if you cd into the backups, you can see what the directories looked like at that time. It's neat!
As always, thanks for the great video!
rsnapshot.org/
#linux #backup
rsnapshot | rsnapshot
rsnapshot.orgfyrfaras
in reply to vkc via PeerTube • • •WTL
in reply to vkc via PeerTube • • •mausmalone
in reply to vkc via PeerTube • • •Just a quick question - when you use a shell script to copy data to vkc@backup.lan - does that user just not have a password?
Having to specify the username and password and mount through fstab has always been my problem with rsync backups - but that's also because I really only know SMB.
Luna Lactea
in reply to mausmalone • • •Once this is done, any time you try to connect to the remote host, you can simply do
ssh [Host nickname]without having to specify which user & without having to type in a password. Your SSH client will read ~/.ssh/config & assume that you meant [username]. You can still log in as other users by specifying them as normal, & you'll still be able to log in with a password for those users unless you decide to also set up key based authentication for them & disable password authentication for them.Luna Lactea
in reply to Luna Lactea • • •Luna Lactea
in reply to Luna Lactea • • •digitalocean.com/community/tut…
How to Create an SSH Key in Linux: Easy Step-by-Step Guide
Justin Ellingwood (DigitalOcean)mausmalone
in reply to Luna Lactea • • •Luna Lactea
in reply to mausmalone • • •Edoardo Regni
in reply to vkc via PeerTube • • •dbc5radio
in reply to vkc via PeerTube • • •William B Peckham
in reply to vkc via PeerTube • • •eleijeep
Unknown parent • • •if your
cpfails for any reason then you're not going to be able to resume the transfer in an efficient way.rsyncmakes resuming an interrupted transfer very easy, because in most cases you can just re-run the same command and it will not re-transfer files which were already successfully completed.Iαη 🍺
in reply to vkc via PeerTube • • •This GUI could help avoid some from giving up on Linux.
Evan Freyer
in reply to vkc via PeerTube • • •gigachad
in reply to vkc via PeerTube • • •antoniovr
in reply to vkc via PeerTube • • •Calandiel
in reply to vkc via PeerTube • • •Jonathan Lamothe
in reply to vkc via PeerTube • • •Mina
in reply to vkc via PeerTube • • •Excellent!
Haven't used it in a long while, but just set up my new backup strategy alongside your tutorial.