{"id":8608,"date":"2025-01-24T05:42:11","date_gmt":"2025-01-24T04:42:11","guid":{"rendered":"https:\/\/shakti.tattva.se\/?p=8608"},"modified":"2025-01-24T05:42:11","modified_gmt":"2025-01-24T04:42:11","slug":"set-up-rsync-server","status":"publish","type":"post","link":"https:\/\/shakti.tattva.se\/index.php\/set-up-rsync-server\/","title":{"rendered":"set up rsync server"},"content":{"rendered":"<p>To set up an rsync backup server on Arch Linux for use with a ReadyNAS, follow these steps:<\/p>\n<hr \/>\n<h3>1. <strong>Install rsync<\/strong><\/h3>\n<p>Install <code>rsync<\/code> on your Arch Linux system:<\/p>\n<pre><code class=\"language-bash\">sudo pacman -S rsync\r\n<\/code><\/pre>\n<hr \/>\n<h3>2. <strong>Create a Backup Directory<\/strong><\/h3>\n<p>Choose a directory to store the backups, e.g., <code>\/backup<\/code>, and ensure proper permissions:<\/p>\n<pre><code class=\"language-bash\">sudo mkdir \/backup\r\nsudo chown rsync:rsync \/backup\r\nsudo chmod 700 \/backup\r\n<\/code><\/pre>\n<hr \/>\n<h3>3. <strong>Create a Dedicated User<\/strong><\/h3>\n<p>Create a user (e.g., <code>rsync<\/code>) for secure file transfers:<\/p>\n<pre><code class=\"language-bash\">sudo useradd -m -d \/home\/rsync -s \/bin\/false rsync\r\nsudo passwd rsync\r\n<\/code><\/pre>\n<hr \/>\n<h3>4. <strong>Configure <code>rsyncd.conf<\/code><\/strong><\/h3>\n<p>Edit or create <code>\/etc\/rsyncd.conf<\/code> for your rsync server configuration:<\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/rsyncd.conf\r\n<\/code><\/pre>\n<p>Example configuration:<\/p>\n<pre><code class=\"language-ini\">uid = rsync\r\ngid = rsync\r\nuse chroot = yes\r\nmax connections = 4\r\nlog file = \/var\/log\/rsyncd.log\r\npid file = \/var\/run\/rsyncd.pid\r\n\r\n[backup]\r\n    path = \/backup\r\n    comment = ReadyNAS Backup\r\n    read only = no\r\n    auth users = rsync\r\n    secrets file = \/etc\/rsyncd.secrets\r\n<\/code><\/pre>\n<hr \/>\n<h3>5. <strong>Set Up Authentication<\/strong><\/h3>\n<p>Create a secrets file for authentication:<\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/rsyncd.secrets\r\n<\/code><\/pre>\n<p>Add a line with the username and password (e.g., <code>rsync:yourpassword<\/code>):<\/p>\n<pre><code>rsync:yourpassword\r\n<\/code><\/pre>\n<p>Set proper permissions:<\/p>\n<pre><code class=\"language-bash\">sudo chmod 600 \/etc\/rsyncd.secrets\r\n<\/code><\/pre>\n<hr \/>\n<h3>6. <strong>Start the rsync Daemon<\/strong><\/h3>\n<p>Enable and start the <code>rsyncd<\/code> service:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl enable rsyncd.service\r\nsudo systemctl start rsyncd.service\r\n<\/code><\/pre>\n<hr \/>\n<h3>7. <strong>Configure ReadyNAS<\/strong><\/h3>\n<p>On your ReadyNAS:<\/p>\n<ol>\n<li>Go to <strong>Backup<\/strong> settings.<\/li>\n<li>Select <strong>Remote: Rsync Server<\/strong>.<\/li>\n<li>Enter the Arch Linux server&#8217;s IP, module name (<code>backup<\/code>), username (<code>rsync<\/code>), and password (<code>yourpassword<\/code>).<\/li>\n<\/ol>\n<hr \/>\n<h3>8. <strong>Test the Backup<\/strong><\/h3>\n<p>Manually test connectivity from ReadyNAS or any client:<\/p>\n<pre><code class=\"language-bash\">rsync rsync:\/\/rsync@&lt;your-arch-linux-ip&gt;\/backup\r\n<\/code><\/pre>\n<p>If this lists the <code>backup<\/code> directory, your setup is ready.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To set up an rsync backup server on Arch Linux for use with a ReadyNAS, follow these steps: 1. Install rsync Install rsync on your Arch Linux system: sudo pacman -S rsync 2. Create a Backup Directory Choose a directory to store the backups, e.g., \/backup, and ensure proper permissions: sudo mkdir \/backup sudo chown&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_kad_post_transparent":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8608","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/8608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/comments?post=8608"}],"version-history":[{"count":1,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/8608\/revisions"}],"predecessor-version":[{"id":8609,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/8608\/revisions\/8609"}],"wp:attachment":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/media?parent=8608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/categories?post=8608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/tags?post=8608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}