-
Notifications
You must be signed in to change notification settings - Fork 259
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
Rsnapshot appears to be sporadically recopying, rather than hotlinking, files which have not changed. #339
Comments
Hold it. This is really weird. I just noticed something. Look at the list above. After I can see from
I didn't have an inode error then, or any indication backups weren't running... and Wait, yep, I can see with So, this raises a few questions: 2.) Is it possible to make it be able to do the hardlinks to the previous folder, whatever that folder's number is, even if there is a number missing in-between? If, as I suspect, it's starting a whole new backup with a whole new set of files every time the previous backup failed, that seems inefficient... at least for as long as backups are failing without me knowing why. 3.) Alternatively, if the last backup failed, why not have it NOT advance all the numbers next time? Don't advance 4.) Is it possible to somehow 'stitch together' the gap, so files in 4.) Why are some backups suddenly 10x-20x the average size of other backups from around the same time? Can this be avoided somehow? I don't know whether this is the cause or the effect of the gaps in backup sequence, but it does happen right before the gaps, so it's suspect. 5.) I know this has been asked about before but I couldn't find a concrete answer that wasn't ancient: email notifications for failed backups? Pretty-please? Thanks. |
On your last point, you should get email notifications from cron, showing all the console output. If you're not getting anything, try turning the verbosity up a tick. Also make sure emails from cron are getting through - temporarily create a job something like It is very odd that you've got 20 backups just missing. At this point it would be really handy to see the relevant bits of your logfile. Did |
Thanks for your response! Re email notification: Ah, yeah, I turned off emails from cron wholesale, I was getting deluged by notices of successful cron job runs, so anything I actually needed to know about was getting buried, and besides, most of the scripts I need to know the status of already email me separately. I'll see if I can set something up more granular. But it would be nice if I could just tick a setting in rsnapshot like I can in some of my other utilities that send email notifications of problems. As to the missing backups... I'll set up a logfile, but right now the most important thing to me in my torrent of verbiage above is point # 3, not why there were failed backups but the effects of them. I'm less concerned right now with why the occasional backup problems happened—I can troubleshoot that—than with the fact that when rsnapshot missed a backup, for whatever reason, the subsequent run after that it still seems to advance This means an occasional backup problem, for whatever reason (network connectivity, name it) can cause your backup drive to fill all available space or inodes far more quickly than expected, which (out of inodes) is exactly what happened to me. So I'd sure like to see a solution to that. If that could be solved, then occasionally missing a backup, for reasons yet to be troubleshot, isn't as much of a worry for me. I suppose as a kludge I could have a script run before every rsnapshot backup that makes sure I'm now positive, by the way, that what I listed as point # 4 was just the effects of a whole new fresh backup set being made rather than an incremental one... I was unclear because I misunderstood the order Ok! Thanks for your work on this project, btw, despite this one issue, overall I adore it, it's a really well-made utility and a real lifesaver for me. |
Checklist
What did you do?
Just using rsnapshot as directed, it seems to be working in every other way besides this.
What happened?
I got a message on my server admin panel that my backup drive is out of inodes. Using
rsnapshot-diff
to compare backups, I've found backups where instead of hardlinking unchanged files, it recopies them... the diff says the files were removed and added again, even though they never changed on disk.For instance, if I do
rsnapshot-diff -v rsnapshot/hourly.160 rsnapshot/hourly.84
, I get lines likeThat moodledata folder is an archive of a project from almost 10 years ago, I haven't touched that folder in ages and don't have anything running that uses it... I took down Moodle in probably 2016, that was two complete server migrations ago.
If I do
diff -bur rsnapshot/hourly.84/localhost/home/wserver/moodledata/ rsnapshot/hourly.160/localhost/home/wserver/moodledata/
I get no changes at all reported, all files are identical:Using
ls
, I can see that one of the listed files has indeed been removed and recopied as a new file with a different inode, the link counts are different, but the size and 9-year-old mod date are identical:Just to confirm those files are in fact identical:
and
md5sum
says so too:I thought maybe some extended attributes might have changed, but it does't appear there are any:
So, these are the same file, nothing has changed but somewhere in there, it didn't hardlink them, it definitely considered it a new file even though it's not, and made a new separate copy of it.
Every time it does this, it does it with about 5GB of files at once (ordinary
hourly.nnn
backups have 250MB-500MB changed.) I can see from sudden 10x jumps in the backup folder size inrsnapshot du
that it appears to do this sporadically, once every few weeks, resulting in additional disk space and a huge number of inodes consumed over time. It's almost like something fundamental is happening, occasionally telling it "this is now a new drive; these are all new files, back up new copies of all these files instead of hardlinking to the last backup's versions" even though the files haven't changed.Here's some excerpts from the output of
rsnapshot du
, showing where it happened:Those above two happened within the last few days, and I haven't worked on the server at all in well over a week, so it was nothing I did.
hourly.5
appears to be what maxed out the drive's inodes so backups couldn't continue until I went in and deleted a ton of stuff.Kind of scary, I was running without any backups being made for a few days and I didn't know.
Here's another one from weeks ago:
Thanks!
What did you expect to happen
All copies of any unchanged file, across all
hourly.nnn
folders, should be hardlinks to the same file.My configuration
Environment
Other information
No response
The text was updated successfully, but these errors were encountered: