Line 235: |
Line 235: |
| === Restore === | | === Restore === |
| ==== Restore single files or directories ==== | | ==== Restore single files or directories ==== |
− | <b>Example 1:</b> It's May, 8th, when user 'briedlin' ask you to restore the messages of his mailbox 'orders' he has inadvertently deleted yesterday at 17:00 h. | + | <b>Example 1:</b> It's May, 9th 20:00, when user 'briedlin' ask you to restore the messages of his mailbox 'orders' he has inadvertently deleted today at 14:00 h. |
| | | |
− | 1. You first must check what backup archives are available. The jobname of this server backup ist 'prodserv'. Run a long listing of the archives directory:<br><br><code># ls -ltr /var/affa/prodserv</code><br> | + | 1. You first must check what backup archives are available. The jobname of this server backup ist 'prodserv'.<br><br><code># affa --list-archives prodserv</code><br> |
| <pre> | | <pre> |
− | drwxr-xr-x 5 root root 4096 Apr 5 15:59 monthly.0
| + | affa version 0.2.0 |
− | drwxr-xr-x 5 root root 4096 Apr 8 04:05 weekly.3
| + | +---------------------------------------------------------------------------+ |
− | drwxr-xr-x 5 root root 4096 Apr 15 04:06 weekly.2
| + | | Job: prodserv | |
− | drwxr-xr-x 5 root root 4096 Apr 22 04:07 weekly.1
| + | | Description: File- and Mailserver Frankfurt 2 | |
− | drwxr-xr-x 5 root root 4096 Apr 29 04:07 weekly.0
| + | | RootDir: /var/affa | |
− | drwxr-xr-x 5 root root 4096 May 1 04:07 daily.6
| + | | Server: affa1.mydomain.de (10.204.48.100) | |
− | drwxr-xr-x 5 root root 4096 May 2 04:07 daily.5
| + | +-----------------------+--------------+--------------+--------+------------+ |
− | drwxr-xr-x 5 root root 4096 May 3 04:07 daily.4
| + | | Date | Archive | Files | Size | Disk usage | |
− | drwxr-xr-x 5 root root 4096 May 4 04:07 daily.3
| + | +-----------------------+--------------+--------------+--------+------------+ |
− | drwxr-xr-x 5 root root 4096 May 5 04:08 daily.2
| + | | Sun 2007 Apr 01 04:06 | monthly.0 | 410510 | 40GB | 407MB/31% | |
− | drwxr-xr-x 5 root root 4096 May 6 04:08 daily.1
| + | +-----------------------+--------------+--------------+--------+------------+ |
− | drwxr-xr-x 5 root root 4096 May 7 04:05 daily.0
| + | | Sun 2007 Apr 08 04:05 | weekly.3 | 410670 | 40GB | 408MB/31% | |
− | drwxr-xr-x 5 root root 4096 May 7 16:08 scheduled.6
| + | | Sun 2007 Apr 15 04:06 | weekly.2 | 410595 | 40GB | 429MB/32% | |
− | drwxr-xr-x 5 root root 4096 May 7 19:09 scheduled.5
| + | | Sun 2007 Apr 22 04:07 | weekly.1 | 415987 | 40GB | 514MB/39% | |
− | drwxr-xr-x 5 root root 4096 May 7 23:05 scheduled.4
| + | | Sun 2007 Apr 29 04:07 | weekly.0 | 428916 | 41GB | 554MB/42% | |
− | drwxr-xr-x 5 root root 4096 May 8 04:08 scheduled.3
| + | +-----------------------+--------------+--------------+--------+------------+ |
− | drwxr-xr-x 5 root root 4096 May 8 07:04 scheduled.2
| + | | Wed 2007 May 02 04:07 | daily.6 | 434362 | 41GB | 562MB/43% | |
− | drwxr-xr-x 5 root root 4096 May 8 10:13 scheduled.1
| + | | Thu 2007 May 03 04:07 | daily.5 | 430567 | 42GB | 563MB/43% | |
− | drwxr-xr-x 5 root root 4096 May 8 13:07 scheduled.0
| + | | Fri 2007 May 04 04:08 | daily.4 | 433874 | 42GB | 562MB/43% | |
| + | | Sat 2007 May 05 04:08 | daily.3 | 435321 | 42GB | 550MB/42% | |
| + | | Sun 2007 May 06 04:08 | daily.2 | 435977 | 42GB | 534MB/41% | |
| + | | Mon 2007 May 07 04:05 | daily.1 | 435952 | 42GB | 522MB/40% | |
| + | | Tue 2007 May 08 04:08 | daily.0 | 434987 | 42GB | 526MB/40% | |
| + | +-----------------------+--------------+--------------+--------+------------+ |
| + | | Wed 2007 May 09 23:08 | scheduled.6 | 435783 | 42GB | 517MB/39% | |
| + | | Wed 2007 May 09 04:08 | scheduled.5 | 436505 | 42GB | 517MB/39% | |
| + | | Wed 2007 May 09 07:04 | scheduled.4 | 436531 | 42GB | 517MB/39% | |
| + | | Wed 2007 May 09 10:09 | scheduled.3 | 436097 | 42GB | 518MB/39% | |
| + | | Wed 2007 May 09 13:13 | scheduled.2 | 436447 | 42GB | 518MB/39% | |
| + | | Wed 2007 May 09 16:19 | scheduled.1 | 436684 | 43GB | 518MB/39% | |
| + | | Wed 2007 May 09 19:10 | scheduled.0 | 437318 | 43GB | 519MB/39% | |
| + | +-----------------------+--------------+--------------+--------+------------+ |
| </pre> | | </pre> |
− | 2. Choose the scheduled.6 archive, which was created an hour before the accident. Now restore the mailbox 'orders' using the rsync command. | + | |
| + | 2. Choose the scheduled.2 archive, which was created less than an hour before the accident. Now restore the mailbox 'orders' using the rsync command. |
| | | |
| | | |
Line 271: |
Line 285: |
| <code># export RDIR=/home/e-smith/users/briedlin/Maildir/.orders/</code><br>Note the leading slash! | | <code># export RDIR=/home/e-smith/users/briedlin/Maildir/.orders/</code><br>Note the leading slash! |
| | | |
− | <code># rsync -av --numeric-ids -e /usr/bin/ssh /var/affa/prodserv/scheduled.6/$RDIR 10.204.48.1:$RDIR</code> | + | <code># rsync -av --numeric-ids -e /usr/bin/ssh /var/affa/prodserv/scheduled.2/$RDIR 10.204.48.1:$RDIR</code> |
| | | |
| | | |