can i backup a timeshift backup (rsync) on my local disk to my nas?

can i backup a timeshift backup (rsync) on my local disk to my nas?

5 minutes ago can i backup a times...

Sources

[TimeShift backups to NAS possible? : r/linuxquestions - Redditfavicon
reddit1

Guide to Backup and Restore Linux Systems with Timeshift - It's FOSS

favicon

itsfoss

2

Is saving backups to a mounted network share (NFS/SMB/etc) still ...

favicon

github

3

Answer

Timeshift is a popular Linux snapshot tool that can create rsync‑based backups on any writable filesystem.
If you already have a Timeshift snapshot stored locally (e.g., on an external USB or a dedicated partition), you can copy that snapshot to a NAS. The process is essentially a file‑level copy, but there are a few nuances to keep in mind.


1. Why Copy a Timeshift Snapshot to a NAS?

  • Redundancy: Having a copy off‑site protects against local disk failure or accidental deletion.
  • Convenience: A NAS can be accessed from multiple machines, making restoration easier if you need to recover on a different system.
  • Space Management: You can keep a long‑term archive on the NAS while retaining only recent snapshots locally.

Timeshift itself does not natively support network destinations, but the snapshots are ordinary directories that can be moved or copied like any other data.


2. Preparing the NAS for the Copy

Step What to Do Why It Matters
Mount the NAS share Use NFS, SMB/CIFS, or another protocol to mount the NAS folder to a local mount point (e.g., /mnt/nas). Timeshift can only write to local paths; the mount point must appear as a local directory.
Ensure write permissions The user running the copy (often root) must have write access to the mount point. Without proper permissions, the copy will fail.
Check filesystem type NAS shares are often ext4, XFS, or NTFS. Some filesystems may not support hard links or large files; rsync can handle most, but verify.

“Timeshift doesn’t support network locations directly, but if you set up NFS and mount it as a local directory /timeshift it could work.”【1】


3. Copying the Snapshot

3.1 Using rsync

sudo rsync -aHAX --progress /timeshift/snapshots/ /mnt/nas/timeshift-backups/
  • -a preserves permissions, timestamps, and recursion.
  • -H preserves hard links (important for rsync snapshots).
  • -A preserves ACLs; -X preserves extended attributes.
  • --progress shows transfer status.

“Timeshift expects (where rsync can clone stuff using hard links).”【3】

3.2 Using cp or tar

If you prefer a simpler approach:

sudo tar -cvpzf /mnt/nas/timeshift-backups/snapshot-$(date +%Y%m%d).tar.gz -C /timeshift/snapshots .

This creates a compressed archive of the snapshot. It’s easier to transfer but loses hard‑link optimization.


4. Verifying the Copy

After the transfer, check that the snapshot directory exists on the NAS:

ls -l /mnt/nas/timeshift-backups/

You can also run a quick checksum comparison:

sudo find /timeshift/snapshots -type f -exec sha256sum {} + | sort > /tmp/local.sha
sudo find /mnt/nas/timeshift-backups -type f -exec sha256sum {} + | sort > /tmp/nas.sha
diff /tmp/local.sha /tmp/nas.sha

No differences means the copy is exact.


5. Restoring from the NAS

If you need to restore a snapshot from the NAS:

  1. Mount the NAS share to a local path (e.g., /mnt/nas).
  2. Copy the snapshot back to the Timeshift directory:
    sudo rsync -aHAX /mnt/nas/timeshift-backups/snapshot-20241120/ /timeshift/snapshots/
    
  3. Run Timeshift and select the newly copied snapshot for restoration.

“If you set up NFS and mount it as a local directory /timeshift it could work.”【1】


6. Caveats & Best Practices

Issue Mitigation
Hard links Use rsync -H to preserve them; otherwise, the snapshot may become larger.
Network reliability For large snapshots, consider using rsync --partial or --inplace to resume interrupted transfers.
NAS filesystem limits Some NAS filesystems (e.g., FAT32) cannot handle large files or many hard links. Use ext4, XFS, or NTFS with proper settings.
Security Mount the NAS over a secure protocol (e.g., NFS over TLS or SMB with encryption).
Automation Schedule a cron job to copy the latest snapshot nightly, ensuring the NAS always has a recent copy.

“Off‑machine rsync backup to a NAS (FreeNAS server). Saved my bacon a few times when I modified or deleted a file.”【4】


7. Bottom Line

Yes, you can back up a Timeshift rsync snapshot from your local disk to a NAS. The key is to mount the NAS share as a local directory and then copy the snapshot using rsync (or another file‑copy tool). This approach gives you an off‑site copy that can be restored later, providing an extra layer of protection for your system state.

How can I automate the rsync transfer of my Timeshift snapshots to the NAS on a nightly basis using cron or systemd timers?

What are the best practices for securing the transfer of Timeshift snapshots to a NAS, such as using NFS over TLS or SMB encryption, and how do I set them up?

Can I encrypt the snapshot files before copying them to the NAS, and if so, what tools or rsync options would you recommend for that?

After copying a snapshot to the NAS, how can I verify that the copy is identical to the original, for example by comparing checksums or using rsync’s --checksum option?

If I need to restore a system state from a snapshot stored on the NAS, what steps should I follow to mount the NAS share, copy the snapshot back, and use Timeshift to perform the restoration?

Guide to Backup and Restore Linux Systems with TimeshiftUsing TimeShift with Synology NAS – Andrew ShawUsing TimeShift with Synology NAS – Andrew Shaw

Copilot