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

restic scan is returning unexpectedly large result #610

Closed
jkahrs opened this issue Sep 8, 2016 · 2 comments
Closed

restic scan is returning unexpectedly large result #610

jkahrs opened this issue Sep 8, 2016 · 2 comments

Comments

@jkahrs
Copy link

jkahrs commented Sep 8, 2016

When backing up a webserver with many html-root dirs I get a bigger scan result than expected

Output of restic version

restic 0.2.0 (v0.2.0-181-g24385ff-dirty)
compiled at 2016-09-07 14:22:18 with go1.7

Expected behavior

restic scans through the directories and gets a combined filezize close to df.

Output of df:
~# df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
rootfs 443G 324G 97G 78% /
/dev/root 443G 324G 97G 78% /
devtmpfs 4,9G 0 4,9G 0% /dev
tmpfs 1001M 164K 1001M 1% /run
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 2,0G 0 2,0G 0% /run/shm

Number of webspaces:
~# ls -l /var/www/ | wc -l
2308

Actual behavior

restic scan finishes at about 3x the used space on / after about 50mins and then begins backing up data

Steps to reproduce the behavior

start a backup on a "larger" web server

restic -r sftp://backup@[....]:2244/restic backup /var/www

@wscott
Copy link

wscott commented Sep 8, 2016

Perhaps your data has a large number of hard links and restic doesn't bother tracking those since the deduplication will eliminate the extra data anyway?

Just guessing at possible reasons. I don't know how hard links are actually handled.

@jkahrs
Copy link
Author

jkahrs commented Sep 8, 2016

@wscott thank you for the tip. I rechecked the structrue within the directorys and actually found some hard links.
As far as i got it from https://github.com/restic/restic/blob/master/src/restic/archiver/archiver.go hardlinks wouldn't be handled while scanning.

@jkahrs jkahrs closed this as completed Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants