blob: 62f9c50e674e4e1290eacb5a9f9903c94a672df5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<!doctype html>
<html lang="EN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/style.css">
<title>Rsync backup to Synology Diskstation</title>
</head>
<body>
<header>
<h1>Bloggings</h1>
<a href="/index.php">Back</a>
</header>
<main>
<article>
<h2>Rsync backup to Synology Diskstation</h2>
<h3>2025-03-25</h3>
<h4>This could change but it works for me.</h4>
<p>My Diskstation isn't always on, so I run this from the command line rather than cron.</p>
<p>To avoid errors devices and links are skipped, permissions, times, group and owner are not written and files are compared by size only.</p>
<p>Ssh is configured with ssh-copy-id for passwordless access and host:port details in .ssh/config</p>
<h3>Note: I set the rsync options on the diskstation but had to chmod 755 my
diskstation's home folder before passwordless ssh worked</h3>
<code>#!/bin/sh
rsync -r --no-D --no-t --no-o --no-g --no-p \
--size-only \
--delete \
--update \
--exclude .cache/ \
--exclude Downloads/ \
--exclude tmp/ \
--exclude .local/share/Trash/ \
--exclude .wine \
--info=progress2 \
--stats \
/home/philip philip@dsm:backup-X220
</code>
</article>
</main>
<footer>
<p> </p><p>§</p></footer>
</body></html>
|