2

I recently did a fresh installation of my linux system (archlinux), but before doing that I did a backup with of my Data. How to copy this folders from my external HDD to my /home folder with full permissions, then I can use them. Thanks

terdon
  • 242,166
  • Welcome to stackexchange. Please elaborate your question with details of how you backed up your data originally and what you've tried already. – steve Jan 27 '17 at 09:12
  • 1
    Hay, actually I just did a rsync -r /home/folder /external-HDD – liquid-snake Jan 27 '17 at 09:17

1 Answers1

1

If you've used some particular backup solution for your files, use that same program to restore the backup.


Provided that the backup was created with proper permissions, you may use rsync to copy the files and directories back.

$ rsync -av /path/to/backup/ $HOME/restored/

The -a flag to rsync is short for the --archive flag, which will, amongst other things, preserve permissions on files and directories.

If you have messed up the permissions in the backup when creating it, the messed up permissions will be copied faithfully by rsync.

I suggest restoring the backup into a subdirectory and not on top of your $HOME.

Kusalananda
  • 333,661