Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing original owner and group after extract #8088

Open
wspatgithub opened this issue Feb 10, 2024 · 3 comments
Open

missing original owner and group after extract #8088

wspatgithub opened this issue Feb 10, 2024 · 3 comments
Labels

Comments

@wspatgithub
Copy link

Have you checked borgbackup docs, FAQ, and open GitHub issues?

Yes

Is this a BUG / ISSUE report or a QUESTION?

Question

System information. For client/server mode post info for both machines.

Your borg version (borg -V).

borg 1.2.6

Operating system (distribution) and version.

Synology OS

Hardware / network configuration, and filesystems used.

How much data is handled by borg?

just a few for testing

Full borg commandline that lead to the problem (leave away excludes and passwords)

borg init --remote-path /usr/local/bin/borg --encryption=repokey-blake2 borg-backup@192.168.60.20:/volume1/Hauptsicherung_SynoOlmi/borg_backup_repo

borg list --remote-path /usr/local/bin/borg borg-backup@192.168.60.20:/volume1/Hauptsicherung_SynoOlmi/borg_backup_repo/::DiskStation-2024-02-10T13:28:51

borg extract --remote-path /usr/local/bin/borg borg-backup@192.168.60.20:/volume1/Hauptsicherung_SynoOlmi/borg_backup_repo/::DiskStation-2024-02-10T13:28:51 volume1/kodi

borg extract --remote-path /usr/local/bin/borg --numeric-ids borg-backup@192.168.60.20:/volume1/Hauptsicherung_SynoOlmi/borg_backup_repo/::DiskStation-2024-02-10T13:28:51 volume1/kodi

Describe the problem you're observing.

I can create the repo, doing the backup and after that, find the files I've backup'ed in the repo. With the detailed list command I can see, that Owner and Goup name is stored inside the repo:

drwxrwxrwx Wolfgang users         0 Sat, 2023-03-11 16:30:53 volume1/kodi/Repositories-old
-rwxrwxrwx admin  users    437729 Tue, 2022-12-27 10:49:57 volume1/kodi/Repositories-old/repository.kodinerds-7.0.1.2(1).zip
-rwxrwxrwx Wolfgang users  33603100 Thu, 2020-01-09 16:07:48 volume1/kodi/Repositories-old/xbmc-master.zip
-rwxrwxrwx Wolfgang users    247288 Sat, 2023-03-11 16:20:42 volume1/kodi/Repositories-old/script.skin.helper.skinbackup-master.zip
-rwxrwxrwx Wolfgang users    761623 Mon, 2021-01-04 17:24:46 volume1/kodi/Repositories-old/repository.guilouz-1.0.3.zip
-rwxrwxrwx Wolfgang users   5271150 Wed, 2020-01-08 16:58:56 volume1/kodi/Repositories-old/repository.membrane-master.zip  

After the restore with borg extract I find all my files belonging to admin / users. I tried extract with and without the parameter --numeric-ids, the result is still the same.

What do I have to do to change this behavior?

Additional Info: Files to be backed up are on my Synology NAS A, the repo is on my Synology NAS B.

Thanks Wolfgang

Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.

Include any warning/errors/backtraces from the system logs

@ThomasWaldmann
Copy link
Member

Did you run borg extract as root?

root is required to change user or group away from the current user/group.

@wspatgithub
Copy link
Author

Hi Thomas,

thanks for that hint. Indeed, after I run borg extract from the root user, everything works as expected.
Maybe I didn't read the doc's carefully enough.

Thanks Wolfgang

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Feb 10, 2024

Not sure the docs point that out, but this is how chown/chgrp works on UNIX / Linux / ... in general.

Just imagine you could create a suid binary owned by your user and then you could chown that to root. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants