0

Now I have a question...

I am creating a backup of my entire owncloud data directory but when I check the result, the ownership and permissions are not the same. What am I doing wrong?

sudo rsync -aAxvhz /media/data/ownclouddata/ /media/backup --delete

On the source it has for one of the folder...

drwxr-xr-x 7 www-data www-data 4.0K Oct 3 14:25 Edwin

And on the destination it has...

drwx------ 2 root root 4.0K Oct 20 07:03 Edwin

???

3
  • why do you need "sudo"? If you can do w/o it will keep your user
    – Rinzwind
    Oct 20, 2018 at 5:44
  • @Rinzwind I doubt that sudo is the reason. Look at the permissions. They are also wrong. And the timestamp as well.
    – PerlDuck
    Oct 20, 2018 at 7:55
  • but -a should be archive and keep permissios
    – Rinzwind
    Oct 20, 2018 at 9:52

2 Answers 2

1

The backup device has an incompatible file system, such as Windows FAT. FS doesn't have owners or permissions. USB and external drives are supplied like that for convenience, but it is bad for Linux users. You may need to delete the partition, create new of proper type, then run mkfs. I am staying conservative on file systems, only ext4.

Because drive tech and connection methods have changed, I cannot guess which way will suit you. In old days, "/sbin/fdisk /dev/sdXXX" (XXX might be b or c for you) would be the way to start. Now if your eternal is SSD, different way needed. There is good chance GNU parted can work to remove old partition and create new, but I worry about device types.

1

Thanks for your help!!! In fact, the permissions were not correct during the rsync progress but once finished, all permissions/ownerships were just as on the source drive.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .