
Backup ignores settings completely
RosivDamotil opened this issue ยท 16 comments
Hi,
I installed this mod to backup my server log files, as they are deleted each day for whatever reason.
I set the config to the following settings:
"retention_mode": "MAX_BACKUPS",
// Applies to retention_mode:MAX_BACKUPS, Sets the maximum number of backups to keep
"max_backups": 20,
But: it only keeps 4 to 5 backups in the backup folder. It also varies from time to time if there are 4 or 5 files present.
There is enough space on the server for 20 backups, but it seems that it completely ignores this setting.
Sorry for the delay in responding to this.
I have not been able to reproduce this issue.
Can you please tell me your Minecraft version
, Fabric/NeoForge version
, and FTB Backups version
It may also be helpful if you can provide your full config file.
Sure:
It's Minecraft 1.21.1, with Fabric 0.16.10 and FTB Backup 1.0.28
// Allow the creation of backups automatically
"enabled": true,
// Permission level to use the /backup command
"command_permission_level": 3,
// Only send backup status to server ops
"notify_op_only": true,
// Don't send backup status at all
"do_not_notify": false,
/* Backup retention mode. Valid Modes: MAX_BACKUPS, TIERED
Note: TIERED mode is an experimental feature, Use at your own risk.
*/
"retention_mode": "MAX_BACKUPS",
// Applies to retention_mode:MAX_BACKUPS, Sets the maximum number of backups to keep
"max_backups": 20,
// Applies to retention_mode:TIERED, The latest x number of backups will be retained
"keep_latest": 20,
// Applies to retention_mode:TIERED, Sets number of hourly backups to keep
"keep_hourly": 1,
// Applies to retention_mode:TIERED, Sets number of daily backups to keep
"keep_daily": 7,
// Applies to retention_mode:TIERED, Sets number of weekly backups to keep
"keep_weekly": 1,
// Applies to retention_mode:TIERED, Sets number of monthly backups to keep
"keep_monthly": 1,
/* This is done with an implementation of cron from the Quartz java library.
More info here
(http://www.cronmaker.com)
*/
"backup_cron": "0 0 */6 * * ?",
// Time between manual backups using the command
"manual_backups_time": 0,
// Only run a backup if a player has been online since the last backup
"only_if_players_been_online": false,
// Additional directories to include in backup
"additional_directories": [
"logs/"
],
/* Additional files and directories to include in backup.
Can specify a file name, path relative to server directory or wildcard file path
Examples: (All file paths are relative to server root)
fileName.txt Any/all file named "fileName.txt"
folder/file.txt Exact file path
folder/ Everything in this folder
path/starts/with* Any files who's path starts with
*path/ends/with.txt Any files who's path ends with
*path/contains* Any files who's path contains
*/
"additional_files": [],
// Display file size in backup message
"display_file_size": false,
// backup location
"backup_location": ".",
// Specify the backup format. Valid options are ZIP and DIRECTORY
"backup_format": "ZIP",
// Minimum free disk space in MB. If a backup's creation would leave less than this amount of disk space remaining, the backup will be aborted.
"minimum_free_space": 500,
// If the previous backup failed due to lack of space, the oldest backup will be deleted to free space.
"free_space_if_needed": true,
/* Specify files or folders to be excluded.
Can specify a file name, path relative to server directory or wildcard file path
Examples: (All file paths are relative to server root)
fileName.txt Any/all file named "fileName.txt"
folder/file.txt Exact file path
folder/ Everything in this folder
path/starts/with* Any files who's path starts with
*path/ends/with.txt Any files who's path ends with
*path/contains* Any files who's path contains
*/
"excluded": [],
/* The dimension used when creating backup preview image, specify "all" to enable automatic detection of primary dimension (can be very slow)
Specify "none" to disable preview
*/
"preview_dimension": "minecraft:overworld"
So I don't see why it only keeps 4-5 backups.
Unfortunately, I am still unable to reproduce the issue, even with your exact minecraft, fabric and backups versions.
But I did notice you have the "free_space_if_needed" option enabled.
Is it possible you only have enough free drive space for 5 backups?
It may also help if you could provide your server log, as it may contain some useful info.
We would recommend supplying your log via a paste service such as https://pste.ch/
I should have enough space for 100 Backups. But as this server is a rental one, I can only give you the logs for the day, as they are deleted each night.
That is why I installes FTBBackup2 in the first place, to keep the logs if anything happens.
But I will disable the "free_space_if_needed" and get back to you.
If it is only keeping 5 backups, then whenever it creates a new backup, it should also delete a backup.
And there should be a message in the logs that says why a backup was deleted.
e.g. something like "more than x backups found, deleting oldest"
So, still only 5 Backups.
The logs are showing this:
[00:00:00] [ftbbackups2_Worker-1/INFO]: Found world folder at /home/sid_7604167/minecraft_fabric_1211/./Aventurien/.
[00:00:00] [ftbbackups2_Worker-1/INFO]: Last backup size: 1.3GB Current world size: 1.7GB Current Available space: 3.3TB ExpectedSize 1.4GB
[00:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:overworld save state to true
[00:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:the_end save state to true
[00:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:the_nether save state to true
[00:00:00] [ftbbackups2_Worker-1/INFO]: Writing to file /home/sid_7604167/minecraft_fabric_1211/backups/backups.json
[00:00:00] [FTB Backups backup thread 0/INFO]: Waiting for world save to complete.
[00:00:01] [FTB Backups backup thread 0/INFO]: Detected MC Version 1.21.1, Data version 3955
[00:00:01] [FTB Backups backup thread 0/INFO]: Save Name: Aventurien
[00:00:08] [FTB Backups backup thread 0/INFO]: Backup preview created, Scan took 3927ms, Capture took 3472ms
[00:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:overworld save state to false
[00:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:the_end save state to false
[00:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:the_nether save state to false
[00:01:05] [FTB Backups backup thread 0/INFO]: Backup size 1.3GB World Size 1.7GB
[00:01:05] [FTB Backups backup thread 0/INFO]: Writing to file /home/sid_7604167/minecraft_fabric_1211/backups/backups.json
[00:01:05] [FTB Backups backup thread 0/INFO]: New backup created at /home/sid_7604167/minecraft_fabric_1211/backups/2025-3-15_0-0-0.zip size: 1.3GB Took: 1m, 0s, 33ms Sha1: 190daecb79a1926ebdcabc8f41715a32f981d58b
[03:11:03] [main/INFO]: Initialized Scheduler Signaller of type: class net.creeperhost.ftbbackups.repack.org.quartz.core.SchedulerSignalerImpl
[03:11:03] [main/INFO]: Quartz Scheduler v.2.0.2 created.
[03:11:03] [main/INFO]: RAMJobStore initialized.
[03:11:03] [main/INFO]: Scheduler meta-data: Quartz Scheduler (v2.0.2) 'ftbbackups2' with instanceId 'NON_CLUSTERED'
Scheduler class: 'net.creeperhost.ftbbackups.repack.org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'net.creeperhost.ftbbackups.repack.org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'net.creeperhost.ftbbackups.repack.org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
[03:11:03] [main/INFO]: Quartz scheduler 'ftbbackups2' initialized from an externally provided properties instance.
[03:11:03] [main/INFO]: Quartz scheduler version: 2.0.2
[03:11:03] [main/INFO]: Scheduler ftbbackups2_$_NON_CLUSTERED started.
[06:00:00] [ftbbackups2_Worker-1/INFO]: Attempting to create an automatic backup
[06:00:00] [ftbbackups2_Worker-1/INFO]: Found world folder at /home/sid_7604167/minecraft_fabric_1211/./Aventurien/.
[06:00:00] [ftbbackups2_Worker-1/INFO]: Last backup size: 1.3GB Current world size: 1.7GB Current Available space: 3.3TB ExpectedSize 1.4GB
[06:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:overworld save state to true
[06:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:the_end save state to true
[06:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:the_nether save state to true
[06:00:00] [ftbbackups2_Worker-1/INFO]: Writing to file /home/sid_7604167/minecraft_fabric_1211/backups/backups.json
[06:00:00] [FTB Backups backup thread 0/INFO]: Waiting for world save to complete.
[06:00:01] [FTB Backups backup thread 0/INFO]: Detected MC Version 1.21.1, Data version 3955
[06:00:01] [FTB Backups backup thread 0/INFO]: Save Name: Aventurien
[06:00:09] [FTB Backups backup thread 0/INFO]: Backup preview created, Scan took 4080ms, Capture took 3586ms
[06:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:overworld save state to false
[06:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:the_end save state to false
[06:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:the_nether save state to false
[06:01:05] [FTB Backups backup thread 0/INFO]: Backup size 1.3GB World Size 1.7GB
[06:01:05] [FTB Backups backup thread 0/INFO]: Writing to file /home/sid_7604167/minecraft_fabric_1211/backups/backups.json
[06:01:05] [FTB Backups backup thread 0/INFO]: New backup created at /home/sid_7604167/minecraft_fabric_1211/backups/2025-3-15_6-0-0.zip size: 1.3GB Took: 1m, 0s, 8ms Sha1: 99326fa39ced839a718e1d73927f0f1486b92382
[12:00:00] [ftbbackups2_Worker-1/INFO]: Attempting to create an automatic backup
[12:00:00] [ftbbackups2_Worker-1/INFO]: Found world folder at /home/sid_7604167/minecraft_fabric_1211/./Aventurien/.
[12:00:00] [ftbbackups2_Worker-1/INFO]: Last backup size: 1.3GB Current world size: 1.7GB Current Available space: 3.3TB ExpectedSize 1.4GB
[12:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:overworld save state to true
[12:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:the_end save state to true
[12:00:00] [ftbbackups2_Worker-1/INFO]: Setting world minecraft:the_nether save state to true
[12:00:00] [ftbbackups2_Worker-1/INFO]: Writing to file /home/sid_7604167/minecraft_fabric_1211/backups/backups.json
[12:00:00] [FTB Backups backup thread 0/INFO]: Waiting for world save to complete.
[12:00:01] [FTB Backups backup thread 0/INFO]: Detected MC Version 1.21.1, Data version 3955
[12:00:01] [FTB Backups backup thread 0/INFO]: Save Name: Aventurien
[12:00:08] [FTB Backups backup thread 0/INFO]: Backup preview created, Scan took 3990ms, Capture took 3497ms
[12:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:overworld save state to false
[12:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:the_end save state to false
[12:01:00] [FTB Backups backup thread 0/INFO]: Setting world minecraft:the_nether save state to false
[12:01:04] [FTB Backups backup thread 0/INFO]: Backup size 1.3GB World Size 1.7GB
[12:01:04] [FTB Backups backup thread 0/INFO]: Writing to file /home/sid_7604167/minecraft_fabric_1211/backups/backups.json
[12:01:04] [FTB Backups backup thread 0/INFO]: New backup created at /home/sid_7604167/minecraft_fabric_1211/backups/2025-3-15_12-0-0.zip size: 1.3GB Took: 0m, 59s, 511ms Sha1: 9c69a4ead5595f4b81d8f61b9991a47bfd66e381```
I see three backup creation events, but no deletions, when FTB Backups deletes an old backup for any reason it should be logged.
Can you provide your backups.json file?
This file: /home/sid_7604167/minecraft_fabric_1211/backups/backups.json
With only 4 Backups in the folder.
According to that file, you should have the following backups.
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-28_12-0-0.zip
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-28_18-0-0.zip
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-29_0-0-0.zip
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-29_6-0-0.zip
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-29_12-0-0.zip
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-29_18-0-0.zip
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-30_0-0-0.zip
/home/sid_7604167/minecraft_fabric_1211/backups/2025-3-30_6-0-0.zip
If any of those fies are missing, then the fact they exist in backups.json would suggest that they were not deleted by FTB Backups.
Is it possible something else on your system is deleting them somehow?
Possible, but the server provider has also no clue why this is the case.
But I will get in touch with them. Thx!
Do you have any other backup mods installed that may be using the same backups folder?
One thing you could try, as a troubleshooting step, would be changing the backup location.