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 ## DO NOT EDIT OR REMOVE THIS FILE! ## 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. #InitiatorName=iqn.2004-10.com.ubuntu:01:e3d5122630f5 InitiatorName=iqn.2000-01.com.synology:synology.default-target.372f9449427
# 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 #!/bin/bash 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!
Awsome! thanks!
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?
I’m also experiencing “Selected device does not have a Linux partition”
For the problem related to the “Selected device does not have a Linux partition” > open your disk manager on ubuntu and format the disk, then create a partition on it.
Correct! Here’s how: https://www.howtoforge.com/how-to-install-iscsi-storage-server-on-ubuntu-22-04/