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

Dynmap not being excluded from backups #541

Open
DR4GONSTEAR opened this issue Mar 13, 2024 · 2 comments
Open

Dynmap not being excluded from backups #541

DR4GONSTEAR opened this issue Mar 13, 2024 · 2 comments

Comments

@DR4GONSTEAR
Copy link

DR4GONSTEAR commented Mar 13, 2024

Original "Dynmap not being excluded from backups"
I was hoping this would have been changed in the last 3 years but the code hasn't changed at all, and still backs up dynmap maps in /var/games/minecraft/[world]/plugins/dynmap/web/tiles

I have a solution:
Change this line:
var args = ['--exclude', path.join(self.env.cwd, 'dynmap'), '{0}/'.format(self.env.cwd), self.env.bwd];
To these lines:
var excludedFolder = path.join(self.env.cwd, 'servers', '*', 'plugins', 'dynmap', 'web', 'tiles');
var args = ['--exclude', excludedFolder, '{0}/'.format(self.env.cwd), self.env.bwd];

This will stop the backup from including /plugins/dynmap/web/tiles/ which will enable backing up config files, but not the maps.

Under this line:
self.archive_with_commit = function(callback) {
Change this line:
var args = ['czf', path.join(self.env.awd, filename), '.'];
To this line:
var args = ['czf', path.join(self.env.awd, filename), '--exclude=./plugins/dynmap/web/tiles', '.'];

This will stop archive_with_commit from including /plugins/dynmap/web/tiles/ which will enable backing up config files, but not the maps. It will also leave archive free to continue making full backups that include the map files when run manually.

@DR4GONSTEAR
Copy link
Author

I've since realised that archive_with_commit does nothing.

Changing all instances of the line:
var args = ['czf', path.join(self.env.awd, filename), '.'];
To:
var args = ['czf', path.join(self.env.awd, filename), '--exclude=./plugins/dynmap/web/tiles', '.'];
would be preferred in that case.

@DR4GONSTEAR
Copy link
Author

It didn't even occur to me, but this is true for Paper servers, and its location of plugins/dynmap/web/tiles. If the plugin folder is ever located elsewhere, this would fail to omit the map files in a backup.

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

1 participant