You are not logged in.

#26 2012-05-21 00:11:20

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: How to rebuild partition table

cp -r won't work if you want to restore everything to a working system. You'll lose too much information. Look up rsync in the wiki - it gives instructions for doing a full system backup.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#27 2012-05-21 10:49:35

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to rebuild partition table

cp -ar should work almost as well as rsync as long as transfers are not interrupted, as with most things it requires proper testing and reading the man pages. But I agree that rsync is more reliable for this purpose.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#28 2012-05-23 23:52:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: How to rebuild partition table

Oh, right. I'd forgotten cp had an archive option. The OP would definitely need that as well as -r, though.

As you say, rsync is still likely to be more reliable. Plus the wiki has instructions for e.g. excluding stuff which gets regenerated on boot etc. which I believe would be a lot more fiddly with cp. [But I've never used cp for archiving - only rsync, recently, and ditto etc. so I can't speak from experience.]

Last edited by cfr (2012-05-23 23:53:21)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#29 2012-05-24 20:09:56

raxbg
Member
Registered: 2011-04-05
Posts: 105

Re: How to rebuild partition table

Thank you for your answers, I will try rsync as soon as I finish the current project I am working on.

Offline

Board footer

Powered by FluxBB