this post was submitted on 06 Aug 2024
4 points (83.3% liked)

Linux 101 stuff. Questions are encouraged, noobs are welcome!

1026 readers
1 users here now

Linux introductions, tips and tutorials. Questions are encouraged. Any distro, any platform! Explicitly noob-friendly.

founded 1 year ago
MODERATORS
 

I want to copy (not move) my Timeshift Snapshots (Rsync) from my existing drive to another drive. Both drives are ext4. As far as I searched I am not able to find any viable results.

If not possible, just why?



Solved

https://www.cyberciti.biz/faq/linux-unix-apple-osx-bsd-rsync-copy-hard-links/

TLDR

sudo rsync -az -H --delete --numeric-ids /path/to/timeshift path/to/destination/

Where,

-a : Archive mode (i.e. recurse into directories, and preserve symlinks, file permissions, file modification times, file group, file owner, device files & special files)

-z : Compress file data during the transfer

H : Preserve hard links (i.e. copy hard links as hard links)

--delete : Delete extraneous files from the receiving side (ones that aren't on the sending side), but only for the directories that are being synchronized i.e. keep exact replica of your /path/to/timeshift directory.

--numeric-ids : Transfer numeric group and user IDs rather than using user and group names and mapping them at both ends.

--progress : Show progress during transfer.

--log-file="/var/log/my-rsync-script.log" : Log what rsync command is doing to the /var/log/my-rsync-script.log file.


Thanks to @[email protected]

Original Comment: https://lemmy.world/comment/11611743

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 1 points 1 month ago (1 children)

Have you looked at Clonezilla?

[โ€“] [email protected] 1 points 1 month ago

I already have several files on the drive which I want to copy the snapshots.

Won't clonezilla replace everything?