Using TimeShift with Synology NAS

TimeShift is a “Linux Equivalent” to Apple TimeMachine, but it uses hard links and rsync to perform its task.

This means that a regular NAS drive cannot be used, as hard links are not something you can do with a network protocol.

However, as I use a Synology drive, I can share a LUN to the Linux machine using iscsi

Using SAN Manager on Synology DSM.

(SAN = Storage Area Network)

Create a LUN

Create an ISCSI target

Now on your Linux box (this one is Ubuntu)

Edit ISCSI config

# vi /etc/iscsi/initiatorname.iscsi

## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator. The InitiatorName must be unique
## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
# vi /etc/iscsi/iscsid.conf, make the following changes

##node.leading_login = No
node.leading_login = Yes

node.session.auth.username_in = <username>
node.session.auth.password_in = <password>

Restart the ISCSI service

# systemctl restart iscsi.service

Start up script

root@Ubuntu-iMac:~# cat /usr/local/sbin/start-iscsi 

iscsiadm -m discovery -t sendtargets -p <nas drive ip>
# iscsiadm -m node -o show
iscsiadm -m node --login


now run the startup-script with sudo before running timeshift!

Author: Andrew

2 thoughts on “Using TimeShift with Synology NAS

  1. I followed the above, except that I didn’t turn on CHAP authorization. When I run the script, then start Timeshift, snapshot location shows Storage SYNOLOGY as an option but says it doesn’t have a Linux partition. Over on Synology, the SAN Manager says that iSCSI is connected to Timeshift at the correct ip, and says that the Timeshift LUN I created is mapped to it and healthy. LUN says that it is connected to the mapped target and is healthy. I’m using thin provisioning and allow all permissions. What could be wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.