March, 2019
19
Well, instead we built a Time Machine out of our administration panel, but, the idea remains the same: let’s go back to the Future!
Rolling Backups
You shouldn’t have to worry about your data, even in your production environment. That’s why we handle it for you for a long time. You’ve got backups for a rolling 30-day period. Each backup is a daily snapshot of your userspace, including:
- all the files in your home folder, including your dotfiles, your caches, and everything you put in this userspace,
- all your e‑mail boxes, per domain then per account, in Maildir format, as well as your Sieve filters,
- all your databases: for SQL ones, you’ve got a gzipped dump per database; for NoSQL bases, a folder containing all the database stuff (like bson data files).
The backups are at another, dedicated, data center, away from our production sites. You can easily access your snapshots at any time from your userspace. Go to the ~/admin/backup
folder to get access to them mounted in your filesystem.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | $ tree -L 2 admin/backup admin/backup ├── 2019-02-12 │ ├── files │ ├── mails │ ├── mongodb │ ├── mysql │ └── postgresql ├── 2019-02-13 │ ├── files │ ├── mails │ ├── mongodb │ ├── mysql │ └── postgresql ├── 2019-02-14 │ ├── files │ ├── mails │ ├── mongodb │ ├── mysql │ └── postgresql ├── 2019-02-15 │ ├── files │ ├── mails │ ├── mongodb │ ├── mysql │ └── postgresql ... |
We mount the snapshots in a read-only mode in your userspace but show the backed-up files with their initial the permissions. So, you’re safe and cannot alter your backed-up data. However, you’re free to parse them.
Bring the Past back in the Future
The old-fashion way
So far, the only way to restore your data was to find the original file to retrieve in your backup directory, then copy it to your home folder. A good way to improve this is to use the rsync
tool if you want to bring an entire folder back:
1 2 | $ rsync -a --progress ~/admin/backup/[target-date]/files/[target-path-w/o-trailing-slash] ~/ |
For databases, you still can rely on databases utils, like mysql
or pg
to inject the dumped data into your database :
1 2 | $ zcat ~/admin/backup/[target-date]/mysql/[dbname].sql.gz | mysql -u [account] -p[password] -h mysql-[account].alwaysdata.net [dbname] |
What about e‑mail boxes then? Well, if you’ve ever tried to handle the Maildir subsystem, you already know what I mean! grep
is your best friend to find the e‑mails you want to retrieve.
The DeLorean
Sure this workflow may be an effective one, but we all know it’s not that user-friendly, that’s why we made our DeLorean!
You can now restore your files directly from your administration panel. Go to the Advanced > Backup recovery section. Pick a target date, then select the content you wish to restore:
- for files, fill the field with the path to the desired file/folder1), relative to your home (e.g.
/[target-dir]/
), - for databases, check the ones you want,
- for e‑mails mailboxes, check the wanted accounts.
Then submit the form, and it works! It’s way simpler.
Remember the process overwrites the current files and databases. So keep a copy before triggering the process if you want to keep your current version. For e‑mails, the tool only restores old e‑mails but does not delete the ones received since the target date. Your current e‑mails remain untouched.
We expect this new utility will help you be more confident about your processes. For us, it’s always right to give you friendly solutions for dealing with your environment, regardless of your technical level. The complexity is ours, so let’s stay focused on your good work!
Notes
↑1 | still limited to one endpoint to restore at a time |
---|
no comments