Koozali.org: home of the SME Server

dar2 selective restore

Offline scottprim

  • 4
  • +0/-0
dar2 selective restore
« on: August 28, 2009, 06:54:42 AM »
Could someone give an example of dar2 syntax to restore a specific user's email directory? I've often wanted to restore a user directory from the external USB drive back to the mail server. For example, in the Disk ARchive GUI within the admin panel, one fills in:
Date:   [ yyyy.mm.dd ] no problem here 2009.08.27
Disaster Recovery: [Disabled / Endabled] no problems here (disabled)
Restore: [syntax question here].. i'd like to restore from my usb drive...
    /media/usbdisk/domain.name/fullbak/*.dar files
Restore To: [syntax question here].. i'd like to restore to my email server...
   /home/e-smith/files/users/bob/Maildir
I would like to know how to complete the "Restore" and "Restore To" fields.
Thank you!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: dar2 selective restore
« Reply #1 on: August 28, 2009, 04:15:02 PM »
Could someone give an example of dar2 syntax to restore a specific user's email directory? I've often wanted to restore a user directory from the external USB drive back to the mail server. For example, in the Disk ARchive GUI within the admin panel, one fills in:
Date:   [ yyyy.mm.dd ] no problem here 2009.08.27
Disaster Recovery: [Disabled / Endabled] no problems here (disabled)
Restore: [syntax question here].. i'd like to restore from my usb drive...
    /media/usbdisk/domain.name/fullbak/*.dar files
Restore To: [syntax question here].. i'd like to restore to my email server...
   /home/e-smith/files/users/bob/Maildir
I would like to know how to complete the "Restore" and "Restore To" fields.
Thank you!
  • Log in as root
  • Mount your drive
  • Start Midnight Commander by typing mc
  • Navigate to the mount that holds your backup
  • Open the backup
  • Copy the files you want to restore

IIRC as this is from the top of my head.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: dar2 selective restore
« Reply #2 on: August 28, 2009, 05:32:20 PM »
dar2 is a great contrib. I use it on some servers, however, the new (since sme 7.4?) backup with dar that is in the base distro manages this very well directly from the restore panel in server manager.
 

Offline scottprim

  • 4
  • +0/-0
Re: dar2 selective restore
« Reply #3 on: August 29, 2009, 12:41:51 AM »
dar2 is a great contrib. I use it on some servers, however, the new (since sme 7.4?) backup with dar that is in the base distro manages this very well directly from the restore panel in server manager.

Yes, am using 7.4. From within the restore panel itself I cannot seem to get a selective restore to work. When I punch the "Perform" button, the whole process finishes quickly, and nothing gets restored. I presume this is pilot error and was looking for help on the "Restore" and "Restore To" fields.
Thank you.

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: dar2 selective restore
« Reply #4 on: August 29, 2009, 06:11:34 AM »
Are you using the Dar2 contrib from Darrell or are you using the built in backup. (Dar2 gives you a new category at the top of the server-manager menu called Disk ARchive.) The Backup With Dar that is built in is under ADMINISTRATION-Backup or restore


go into the the administration-view log files panel in server-manager and look in the messages log. See if you can see what is happening around the restore time. Do you see the prerestore routine? what about the mount of the backup volume?

If you want to do a test restore I would suggest creating a directory in root named restore. You can then make the Restore To field be /restore.


Offline scottprim

  • 4
  • +0/-0
Re: dar2 selective restore
« Reply #5 on: August 29, 2009, 08:05:39 PM »
Are you using the Dar2 contrib from Darrell or are you using the built in backup. (Dar2 gives you a new category at the top of the server-manager menu called Disk ARchive.) The Backup With Dar that is built in is under ADMINISTRATION-Backup or restore


go into the the administration-view log files panel in server-manager and look in the messages log. See if you can see what is happening around the restore time. Do you see the prerestore routine? what about the mount of the backup volume?

If you want to do a test restore I would suggest creating a directory in root named restore. You can then make the Restore To field be /restore.

Good advice on reviewing logfiles. Doh! Why didn't I do so. Progress, but not yet success. The first thing is to make sure the source is unmounted. Okay. Then choose the following for source/destination (Restore, Restore To):

Restore: username
Restore To: /home/e-smith/files/users/username

The script runs, but no nodes restored. Here is a log snippet:

Aug 29 12:05:22 mail e-smith-bg: Extracting contents of the archive...
Aug 29 12:05:22 mail e-smith-bg:
Aug 29 12:05:22 mail e-smith-bg:
Aug 29 12:05:22 mail e-smith-bg:  --------------------------------------------
Aug 29 12:05:22 mail e-smith-bg:  0 inode(s) restored
Aug 29 12:05:22 mail e-smith-bg:  0 inode(s) not restored (not saved in archive)
Aug 29 12:05:22 mail e-smith-bg:  24 inode(s) ignored (excluded by filters)
Aug 29 12:05:22 mail e-smith-bg:  0 inode(s) less recent than the one on filesystem
Aug 29 12:05:22 mail e-smith-bg:  0 inode(s) failed to restore (filesystem error)
Aug 29 12:05:22 mail e-smith-bg:  0 inode(s) deleted
Aug 29 12:05:22 mail e-smith-bg:  --------------------------------------------
Aug 29 12:05:22 mail e-smith-bg:  Total number of inode considered: 24
Aug 29 12:05:22 mail e-smith-bg:  --------------------------------------------
Aug 29 12:05:22 mail e-smith-bg: Dismounting /media/usbdisk
Aug 29 12:05:22 mail e-smith-bg: Sat Aug 29 12:04:46 CDT 2009 - restore started
Aug 29 12:05:22 mail e-smith-bg: Sat Aug 29 12:05:22 CDT 2009 - restore finished

How come there are "24 inode(s) ignored"

Thank you for your help.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: dar2 selective restore
« Reply #6 on: August 29, 2009, 08:28:24 PM »
Restore: username
Restore To: /home/e-smith/files/users/username
Err, shouln't that be:
Restore: /home/e-smith/files/users/username
Restore To: /home/e-smith/files/users/username

AFAIK you need to specify the full path that you would like to restore... as it is not stored as username in the backup.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline scottprim

  • 4
  • +0/-0
Re: dar2 selective restore
« Reply #7 on: August 30, 2009, 03:06:24 AM »
Err, shouln't that be:
Restore: /home/e-smith/files/users/username
Restore To: /home/e-smith/files/users/username

AFAIK you need to specify the full path that you would like to restore... as it is not stored as username in the backup.

dar2 doesn't like absolute paths for Restore; e.g. Restore: /home/..
it required home/e-smith/...

this was quite a chore. i had a problem with passwords too. i very much appreciate all posts and help. however, i am moving to the new built-in "Workstation Backup" in lieu of the contrib. again thank you, and if there is request, i'll post the steps.

thank you.

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: dar2 selective restore
« Reply #8 on: August 31, 2009, 04:39:36 AM »
Glad you got what you needed. If you have looked at the built in backup you will see that a selective restore lists all the files and directories in the archive.

It is a nice addition to the distro IMO.

Offline jekal

  • **
  • 21
  • +0/-0
Re: dar2 selective restore
« Reply #9 on: August 31, 2009, 06:57:03 PM »
Hi,

does this also works if the backup ist splitted in many files and compressed?

I always get error messages if I try to open a 2GB dar file with mc.

Regards
Jens

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: dar2 selective restore
« Reply #10 on: August 31, 2009, 07:04:25 PM »
Yes you will see all the files in the backup catalog. You can set the date from which you want to restore and the restore will come from the first file in the catalog that is prior to the restore date set.

If you do not set a date the restore will come from the newest backup instance of the file in the cataloge.


Offline janet

  • *****
  • 4,812
  • +0/-0
Re: dar2 selective restore
« Reply #11 on: September 01, 2009, 01:16:59 AM »
jekal

Try splitting your backup file into "smaller than" 2Gb chunks.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.