Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: kruhm on September 18, 2014, 01:00:03 PM
-
Hi,
I have a full backup via ADMINISTRATION>BACKUP AND RESTORE (dar). I want to restore just a single directory and all the files and subdirectories:
/home/e-smith/files/ibays/my-ibay/files
So that I don't create even a larger mess, can someone help me with the command?
Thanks in advance.
-
I have a full backup via ADMINISTRATION>BACKUP AND RESTORE (dar). I want to restore just a single directory and all the files and subdirectories:
/home/e-smith/files/ibays/my-ibay/files
So that I don't create even a larger mess, can someone help me with the command?
Are you using the built in backup or a contrib ?
Either way, having a quick read in the wiki is your guide in the first instance.
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter10#Backup_or_restore
http://wiki.contribs.org/DAR2#Manual_restore_of_DAR2_configuration
With the built in back up you can do a selective file restore but I am not sure about entire directory. With the contrib there seems to be some plugins for mc to allow you to view the files, and presumably restore them.
Have a read and supply a little more detail and we may be able to help more !
B. Rgds
John
-
Thanks for the reply.
I'm using the built-in backup v8 and trying do to a selective restore of a directory that got trashed by cryptowall/cryptoblocker.
I select the directory but it looks like the restore is trying to do a file-by-file selective restore. Because there are too many files in the directory, it errors out "Error while calling execvp:Argument list too long."
I was hoping there is a simple directory restore option. Something like:
dar -x /media/BackupDrive1/server.domain.local/set0/full-201407260604 -N -R / -w -g home/e-smith/files/ibays/share_data/files/
I looked through the wiki but didn't see anything that pertains to this type of directory restore. The options are dizzying and most of what I see is either a full system restore or a selective-file restore.
-
Think you are on the right track
A bit of reading reading here :
http://fvue.nl/wiki/Dar:_extract_specific_directory
And clearly in more details here :
http://dar.sourceforge.net/doc/Tutorial.html at Step 4.
Is there an option to restore to a different directory ? You could then run a test on a small subfolder and see what pops out. dar also has a dry-run mode with -e I think.
You could also add a bug for a NFR for the ability to restore an entire folder rather than a group of files. It may not happen over night but worth the question.
Sorry I can't help you more.
B. Rgds
John
-
Thanks for the reassurance and for the direction. I appreciate the peer review.
You're right, I was able to test it on a smaller directory first to verify that it works OK.
Feeling good, I performed the following.
MOUNT BACKUPDRIVE:
mount /dev/sdc1 /media/BackupDrive1/
RESTORE DIRECTORY:
dar -x /media/BackupDrive1/server.domain.local/set2/full-201408092200 -N -R / -w -g home/e-smith/files/ibays/share_data/files
That seems to be working.
It looks like I'll have to do all the incrementals as well:
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408102200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408112200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408122200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408132200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
I'll let you know if it doesn't go well.
Thanks again,
-
this should be in wiki too..
-
Thanks for the reassurance and for the direction. I appreciate the peer review.
Ha - me - peer ? LOL :-)
You're right, I was able to test it on a smaller directory first to verify that it works OK.
Feeling good, I performed the following.
MOUNT BACKUPDRIVE:
mount /dev/sdc1 /media/BackupDrive1/
RESTORE DIRECTORY:
dar -x /media/BackupDrive1/server.domain.local/set2/full-201408092200 -N -R / -w -g home/e-smith/files/ibays/share_data/files
That seems to be working.
It looks like I'll have to do all the incrementals as well:
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408102200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408112200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408122200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
dar -x /media/BackupDrive1/server.domain.local/set2/inc-001-201408132200.1.dar -N -R / -w -g home/e-smith/files/ibays/share_data/files
I'll let you know if it doesn't go well.
Good work. As Stefano says, please add it to the wiki, or put a Documentation bug / NFR in and someone will help you do it.
There are others who have asked the same question so it is good to document it.
B. Rgds
John
-
-added to WIKI:
http://wiki.contribs.org/Backup_with_dar
Open for comments, changes, edits, etc.
-
-added to WIKI:
http://wiki.contribs.org/Backup_with_dar
Open for comments, changes, edits, etc.
Well done and thank you !!!! I just modified the heading to clarify a little.
But that's a killer bit of work.
B. Rgds
John