{"id":162229,"date":"2024-10-11T17:06:13","date_gmt":"2024-10-11T15:06:13","guid":{"rendered":"https:\/\/hifivem.com\/?p=162229"},"modified":"2026-08-09T12:55:27","modified_gmt":"2026-08-09T10:55:27","slug":"fivem-sunucunuzu-nasil-yedeklersiniz","status":"publish","type":"post","link":"https:\/\/fivemx.com\/tr\/fivem-sunucunuzu-nasil-yedeklersiniz\/","title":{"rendered":"How to Back Up a FiveM Server and Test the Restore"},"content":{"rendered":"<p><!-- fivemx-blog-portfolio-wave2:2026-08-09:how-to-backup-your-fivem-server --><\/p>\n<p><strong>A usable FiveM backup contains the resources, configuration, database and the information needed to restore them together.<\/strong> A copied folder is incomplete when player, inventory, housing or economy state lives in MariaDB\/MySQL.<\/p>\n<h2>Define the backup set<\/h2>\n<ul>\n<li>resource folders and custom scripts<\/li>\n<li><code data-no-translation=\"\">server.cfg<\/code>, permissions and deployment configuration<\/li>\n<li>txAdmin profiles and recipes you actually need<\/li>\n<li>a consistent database dump<\/li>\n<li>version notes for artifacts, framework and dependencies<\/li>\n<\/ul>\n<p>Exclude caches, logs and generated files unless they are required for an investigation. Never place secrets in a public repository.<\/p>\n<p>For MariaDB, verify the current options in the official <a href=\"https:\/\/mariadb.com\/kb\/en\/mariadb-dump\/\" rel=\"nofollow noopener\" target=\"_blank\">mariadb-dump documentation<\/a> instead of copying credentials or flags from an unrelated server.<\/p>\n<h2>Windows: PowerShell and Task Scheduler<\/h2>\n<p>Create a PowerShell script that stops or coordinates writes, exports the database with your database vendor&#8217;s dump tool, copies the server files and writes into a timestamped directory. Use explicit paths and fail when the database export fails.<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">$Stamp = Get-Date -Format 'yyyyMMdd-HHmmss'\n$Destination = \"D:\\FiveM-Backups\\$Stamp\"\nNew-Item -ItemType Directory -Path $Destination | Out-Null\nCopy-Item 'D:\\FXServer\\server-data' \"$Destination\\server-data\" -Recurse\n# Run the database dump command documented for your database installation.<\/code><\/pre>\n<p>In Task Scheduler, create a dedicated low-privilege service account, run whether the user is logged on or not, set the PowerShell program and script path explicitly, and configure failure\/retry history. Test the task manually before relying on its schedule.<\/p>\n<h2>Linux: script and cron\/systemd timer<\/h2>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">#!\/usr\/bin\/env bash\nset -euo pipefail\nstamp=$(date -u +%Y%m%dT%H%M%SZ)\ndest=\"\/srv\/backups\/fivem\/$stamp\"\ninstall -d -m 0700 \"$dest\"\ntar -C \/srv\/fivem -czf \"$dest\/server-data.tar.gz\" server-data\n# Add the authenticated database dump command for your MariaDB\/MySQL setup.<\/code><\/pre>\n<p>Run it through a systemd timer or cron with a dedicated account. Log exit status and alert on failure. Do not hardcode database passwords in a world-readable script.<\/p>\n<h2>Use the 3-2-1 rule<\/h2>\n<p>Keep three copies, on two storage types, with one copy off-site. Encrypt off-site archives, define retention, and prevent the production server from deleting every remote generation if its credentials are compromised.<\/p>\n<h2>Restore validation<\/h2>\n<ol>\n<li>Provision a clean staging host.<\/li>\n<li>Restore the database and files from one selected recovery point.<\/li>\n<li>Start the exact artifact\/framework combination recorded with the backup.<\/li>\n<li>Join as a normal player and verify character, inventory, jobs, housing and permissions.<\/li>\n<li>Record restore time and missing dependencies, then repair the backup process.<\/li>\n<\/ol>\n<p>A scheduled \u201csuccess\u201d means only that the job exited. A completed restore test is the proof.<\/p>","protected":false},"excerpt":{"rendered":"<p>Back up FiveM resources, configuration and database on Windows or Linux, keep off-site copies and prove the restore works.<\/p>","protected":false},"author":1,"featured_media":185837,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1899],"tags":[],"class_list":["post-162229","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/posts\/162229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/comments?post=162229"}],"version-history":[{"count":5,"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/posts\/162229\/revisions"}],"predecessor-version":[{"id":213901,"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/posts\/162229\/revisions\/213901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/media\/185837"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/media?parent=162229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/categories?post=162229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/tr\/wp-json\/wp\/v2\/tags?post=162229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}