minecraft-backup icon indicating copy to clipboard operation
minecraft-backup copied to clipboard

Exclude certain subfolders

Open redxon opened this issue 4 years ago • 2 comments

Hello

i don't know if this is possible yet and I was looking for a solution for it.

Is it possible to exclude a subfolder from the script? I looked into it but wasn't able to figure out how to do it. Reason is, I want to backup my whole minecraft folder, with the configurations and plugins and everything but want to exclude the dynmap web folder as this is too large and is not needed. Is this possible or can it be implemented?

Thanks

redxon avatar Mar 09 '21 23:03 redxon

There's no officially supported way in the script right now, but here's an idea:

Move your dynmap web folder outside of the server directory, and then replace it with a symbolic link. By default, the backup script uses tar which will not traverse symbolic links by default. For example:

mv dynmap ../dynmap
ln -s ../dynmap dynmap

Then when you backup your server directory it will just have the symbolic link instead of the contents of dynmap.

nicolaschan avatar Mar 10 '21 00:03 nicolaschan

Was about to post about excluding the datapacks folder. This seems to be my solution!

3jlowes avatar Dec 04 '21 10:12 3jlowes