Note: If your site (or other service) has been completely deleted, see [[Undelete|this related entry]]. This entry covers only the process you can use to access past snapshots of site content.
Rolling back a MariaDB 10.x process to an earlier state
If you've accidentally deleted a file or files on your website, or you want to roll back to a recent backup, you may be able to fix that yourself. On the ssh server, the /home/.zfs/snapshot directory allows you to access historical snapshots of your site. Snapshot names are 12-digit numbers based on the date and time the snapshot was created, in the form YYYYMMDDHHMM. For example, if a snapshot is named 202401021200, then it was created on 2024-01-02 at 12:00 UTC. Snapshots are created every twelve hours and a site may have up to 60 snapshots covering the past 30 days, depending on how large the site currently is, how fast the site's content changes, and how long ago it was created.
You can copy individual files out to the live site:
YourPrompt$ cp /home/.zfs/snapshot/202401021200/public/whoopsie-deleted.txt /home/public/.
You can also use a tool like rsync to recover entire directories:
YourPrompt$ rsync --dry-run -va /home/.zfs/snapshot/202401021200/public/. /home/public/.
The --dry-run flag will cause rsync to tell you what it would do instead of doing anything, so
you can make sure the behavior is what you expect. Once you're sure you're putting the right files in the right
place, run rsync without --dry-run and it will perform the operation for real.
The rsync command also supports --delete and --force flags (among many
others), which may be useful to make sure there aren't other stray files lying around. But these flags can also be
very dangerous; if the command isn't exactly right, they may delete something other than what you intended.
Rolling back a MariaDB 10.x process to an earlier state
Use the Attempt to recover deleted content assistance request. The process is very similar, although the costs are much, much higher. Further details are under the appropriate heading on that page.
