You are not logged in.
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
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
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
Thank you for your answers, I will try rsync as soon as I finish the current project I am working on.
Offline