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

large backup dir #57

Open
isaaclw opened this issue May 1, 2022 · 6 comments
Open

large backup dir #57

isaaclw opened this issue May 1, 2022 · 6 comments
Labels
not a bug Maybe a support request or a spam

Comments

@isaaclw
Copy link

isaaclw commented May 1, 2022

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?

@danny0838
Copy link
Owner

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.

@danny0838 danny0838 added the not a bug Maybe a support request or a spam label May 3, 2022
@isaaclw
Copy link
Author

isaaclw commented Jun 14, 2022

Ok, so if I have other backups with another system, how can I delete these and ensure they're not re-created?

@danny0838
Copy link
Owner

danny0838 commented Jun 16, 2022

You can simply tweak "backup" related options in WebScrapBook to disable backups.

@isaaclw
Copy link
Author

isaaclw commented Jun 17, 2022

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?

@danny0838
Copy link
Owner

This is unexpected, but you can simply try and see if there's a problem.

@isaaclw
Copy link
Author

isaaclw commented Jun 17, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Maybe a support request or a spam
Projects
None yet
Development

No branches or pull requests

2 participants