PyWebScrapBook
PyWebScrapBook copied to clipboard
large backup dir
My Web Scrab Book folder is 17G, and 15G of it is backups:
root@ohm:~# du -hs /opt/wsb/.wsb/backup
15G /opt/wsb/.wsb/backup
root@ohm:~# du -hs /opt/wsb/.wsb/
15G /opt/wsb/.wsb/
root@ohm:~# du -hs /opt/wsb/
17G /opt/wsb/
Is that necessary? What does that folder do?
Backups are not mandatory but may be used for version comparing (e.g. generated for a recapture) or corruption recovery (e.g. transaction failure, backend index generating and checking). You can delete them safely after making sure that they are obsolete.
Ok, so if I have other backups with another system, how can I delete these and ensure they're not re-created?
You can simply tweak "backup" related options in WebScrapBook to disable backups.
Ok, I think that means in each plugin I have to uncheck 'backups'.
That's a bit tricky since I have multiple computers, so I just need to remember to check each one.
But maybe I can put a zero length file in place of .wsb/backup
? Then backups would continue to fail until I turn off the option?
This is unexpected, but you can simply try and see if there's a problem.
Ok, zero length file didn't work, and symlink to /dev/null didn't work either.
I have all backup options turned off in my local plugin, and I don't see any options on the server.
I guess for now I'll just create a cron job that deletes anything older than... 7 days?
#!/bin/bash
BACKUP=/opt/wsb/.wsb/backup
BACKUP_EXPIRE=7
find "$BACKUP" -type f \( -mtime +"$BACKUP_EXPIRE" -o -ctime +"$BACKUP_EXPIRE" \) -exec rm {} \;
Just documenting this for others in case they're interested.