<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:04:30 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[MC-4417] Command save-off does not work as expected</title>
                <link>https://bugs.mojang.com/browse/MC-4417</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;I am working on a server admin script, and am trying to automate backups of my world directories on regular intervals. I know the commands &lt;tt&gt;save-off&lt;/tt&gt; and &lt;tt&gt;save-all&lt;/tt&gt; are what I should be doing to flush the current state to disk before creating my backup. However, I am getting some unexpected behavior I believe is a bug.&lt;/p&gt;

&lt;p&gt;My backup-process is basically this:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;issue &lt;tt&gt;save-all&lt;/tt&gt; command, wait for &quot;Saved the world&quot; to be output by server&lt;/li&gt;
	&lt;li&gt;issue &lt;tt&gt;save-off&lt;/tt&gt; command, wait for &quot;Turned off world auto-saving&quot; to be output by server&lt;/li&gt;
	&lt;li&gt;Create a tar.gz archive via &lt;tt&gt;tar czf &quot;/path/to/backup.tar.gz&quot; .&lt;/tt&gt; (with the server dir as the cwd)&lt;/li&gt;
	&lt;li&gt;issue &lt;tt&gt;save-on&lt;/tt&gt; command, wait for &quot;Turned on world auto-saving&quot; to be output by server&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Currently, I have to add a 5 second delay between steps 2 and 3 because otherwise, my &lt;tt&gt;tar&lt;/tt&gt; command will always fail because files within the directory are modified during the attempt at creating the tar file.&lt;/p&gt;

&lt;p&gt;Something in the server output is misleading, my suspicion is either &lt;tt&gt;save-all&lt;/tt&gt; or &lt;tt&gt;save-off&lt;/tt&gt; is reporting completion incorrectly, or perhaps I am not approaching this backup process correctly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="16926">MC-4417</key>
            <summary>Command save-off does not work as expected</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="7">Invalid</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="dominicbarnes">Dominic Barnes</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Dec 2012 16:51:35 +0100</created>
                <updated>Tue, 11 Dec 2012 17:22:03 +0100</updated>
                            <resolved>Tue, 11 Dec 2012 03:00:09 +0100</resolved>
                                    <version>Minecraft 1.4.5</version>
                    <version>Snapshot 12w49a</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="27805" author="dominicbarnes" created="Tue, 11 Dec 2012 17:22:03 +0100"  >&lt;p&gt;How is this resolved? &lt;tt&gt;save-off&lt;/tt&gt; is not doing it&apos;s job. Or are we just considering this a duplicate of 2527?&lt;/p&gt;</comment>
                            <comment id="27684" author="bljat" created="Tue, 11 Dec 2012 03:00:09 +0100"  >&lt;p&gt;Resolving then. For &quot;save complete&quot; issue see &lt;a href=&quot;https://bugs.mojang.com/browse/MC-2527&quot; title=&quot;Save is not really complete when /save-all says &amp;quot;Save complete.&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-2527&quot;&gt;&lt;del&gt;MC-2527&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="27640" author="dominicbarnes" created="Mon, 10 Dec 2012 22:16:44 +0100"  >&lt;p&gt;Yeah, understandable given it runs multi-threaded. All I&apos;m hoping is that the devs will delay printing &quot;Save Complete&quot; until saving is actually complete, otherwise I can never be entirely sure when it is safe to back-up... without resorting to ridiculous loops/polling. &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/tongue.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="27636" author="cubethethird" created="Mon, 10 Dec 2012 22:08:16 +0100"  >&lt;p&gt;I doubt it can, as it seems commands executed in the server terminal run backgrounded.&lt;/p&gt;</comment>
                            <comment id="27633" author="dominicbarnes" created="Mon, 10 Dec 2012 21:51:20 +0100"  >&lt;p&gt;Yeah, that seems to work better and doesn&apos;t need the full 5 seconds I was needing before. Still requires a delay unfortunately, which is what I&apos;m hoping can be avoided.&lt;/p&gt;</comment>
                            <comment id="27631" author="dominicbarnes" created="Mon, 10 Dec 2012 21:29:48 +0100"  >&lt;p&gt;I&apos;ll give that a shot, I&apos;ll see if I get any better results. I&apos;ll report back here soon.&lt;/p&gt;</comment>
                            <comment id="27626" author="cubethethird" created="Mon, 10 Dec 2012 20:52:29 +0100"  >&lt;p&gt;I recently went through the same process as you, but i did something slightly differently.&lt;br/&gt;
1. I execute save-off&lt;br/&gt;
2. I execute save-all&lt;br/&gt;
3. Wait 2 seconds&lt;br/&gt;
4. I create the backup&lt;br/&gt;
5. I execute save-on&lt;/p&gt;

&lt;p&gt;Does this help?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 10 Dec 2012 20:52:00 +0100</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Unconfirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0a7z3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>