Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I maintain a copy of remote drive with rsync?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2144

PostPosted: Sat Oct 19, 2024 12:50 pm    Post subject: How do I maintain a copy of remote drive with rsync? Reply with quote

I'm getting lazy in my old age - too lazy to fight my way through the rsync man pages, at any rate. ;-)

I have a Raspberry Pi running Arch Linux that runs various minor services on my home network. It struck me that I don't have a backup process for it.
It's fairly small, and mostly only a few files being updated on a regular basis (apart from periodic system software updates with pacman). Probably the easiest way to back it up would be to maintain a folder on my desktop machine containing a clone of the entire Pi filesystem, using rsync. That would then get swept up in my usual desktop backup process (which happens to use app-arch/dump). Should disaster strike, I'd hope it would be "mount a new formatted and partitioned SD card locally on the desktop machine, then rsync the entire filesystem back".

I have rsync installed on both the Pi and my desktop. My preference would be to use the rsync daemon as root on the Pi - I have ssh set to deny root.

I'd be most grateful if someone who has a similar setup could post the outlines of commands and rsyncd.conf. So far I've come across --fake-root and --links, which seem essentials. The Arch wiki has a relevant article, but as it's missing both those options, either I'm over- or they're under-thinking it!
_________________
Greybeard
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3378

PostPosted: Sat Oct 19, 2024 2:18 pm    Post subject: Reply with quote

AFAIR this does everything:
rsync -aAXHS

The example rsync conf looks simple enough, probably just need to set path=/, and also chroot=yes is pointless if you're going to expose everything anyway, though it might as well "just work"™ with the default config. I've never used rsync daemon, always tunneled it through ssh.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum