this post was submitted on 06 Aug 2024
25 points (93.1% liked)

Linux

48323 readers
637 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years 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 @skullgiver@popplesburger.hilciferous.nl

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

all 12 comments
sorted by: hot top controversial new old
[–] Landless2029@lemmy.world 4 points 3 months ago (1 children)

Nice addition of solution.

In time Lemmy will replace reddit for tech questions. Give it a few years!

[–] gpstarman@lemmy.today 1 points 3 months ago* (last edited 3 months ago)

Thanks man.

replace reddit for tech questions.

The thing is as of right now most Lemmy users are just tech enthusiasts. We want all sort of people to create a more robust community. I want to Lemmy to fully replace reddit in terms of amount of users, communities, posts and activeness.

Let's just give Lemmy some time.

[–] Churbleyimyam@lemm.ee 3 points 3 months ago (1 children)

Have you looked at Clonezilla?

[–] gpstarman@lemmy.today 1 points 3 months ago (1 children)

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

Won't clonezilla replace everything?

[–] Churbleyimyam@lemm.ee 2 points 3 months ago

it will, yes. Which is good if you want to keep everything from from the source drive but bad if you want to keep everything from the destination drive.

[–] electricprism@lemmy.ml 1 points 3 months ago (1 children)

Can't remember if this had mv in scope, still good to keep on radar

https://github.com/digint/btrbk

[–] gpstarman@lemmy.today 1 points 3 months ago

My snapshot is rsync on ext4.

Thanks anyways.