Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: holck on January 10, 2015, 04:27:06 PM

Title: Help needed to restore from dar backup
Post by: holck on January 10, 2015, 04:27:06 PM
I want to switch from SME 8 on one machine to SME 9 on another machine. I've already installed SME 9 and some additional contribs etc. on the new machine, and now I'm preparing for transferring user files etc. also. I have daily backups with dar on the old machine.

In order to minimize the time to make the switch, my plan is to
But I need to be sure that dar

I have done some tests with dar, and my experience is that dar always overwrites all files, and never deletes recently added files.

First, show contents of local directory "etc":
Code: [Select]
# find etc
etc
etc/imap
etc/imap/nyfil
etc/imap/fil1
Perform backup with dar
Code: [Select]
# dar -c mybackup -R ./etc
 --------------------------------------------
 3 inode(s) saved
   including 0 hard link(s) treated
 0 inode(s) changed at the moment of the backup and could not be saved properly
 0 byte(s) have been wasted in the archive to resave changing files
 0 inode(s) not saved (no inode/file change)
 0 inode(s) failed to be saved (filesystem error)
 0 inode(s) ignored (excluded by filters)
 0 inode(s) recorded as deleted from reference backup
 --------------------------------------------
 Total number of inode(s) considered: 3
 --------------------------------------------
 EA saved for 0 inode(s)
 --------------------------------------------
Copy a new file to etc/imap
Code: [Select]
# cp fil1 etc/imap/new_file
Try restore with dar
Code: [Select]
# dar -x mybackup -r -w -R ./etc
--------------------------------------------
 2 inode(s) restored
    including 0 hard link(s)
 0 inode(s) not restored (not saved in archive)
 1 inode(s) not restored (overwriting policy decision)
 0 inode(s) ignored (excluded by filters)
 0 inode(s) failed to restore (filesystem error)
 0 inode(s) deleted
 --------------------------------------------
 Total number of inode(s) considered: 3
 --------------------------------------------
 EA restored for 0 inode(s)
 --------------------------------------------
The added file is still there...
Code: [Select]
# find etc
etc
etc/imap
etc/imap/nyfil
etc/imap/fil1
etc/imap/new_file
And doing an additional restore seems to restore the files once more
Code: [Select]
# dar -x mybackup -r -w -R ./etc
 --------------------------------------------
 2 inode(s) restored
    including 0 hard link(s)
 0 inode(s) not restored (not saved in archive)
 1 inode(s) not restored (overwriting policy decision)
 0 inode(s) ignored (excluded by filters)
 0 inode(s) failed to restore (filesystem error)
 0 inode(s) deleted
 --------------------------------------------
 Total number of inode(s) considered: 3
 --------------------------------------------
 EA restored for 0 inode(s)
 --------------------------------------------

Dar has so many options, it's quite confusing to me .. Maybe someone here can help?
Title: Re: Help needed to restore from dar backup
Post by: Stefano on January 10, 2015, 06:38:22 PM
search for affa..
Title: Re: Help needed to restore from dar backup
Post by: janet on January 11, 2015, 12:31:25 PM
holck

The correct procedure is to install the clean copy of sme9, then restore the backup & then install contribs.
Contribs previously installed on sme 8 will pick up their data from the restored data.
I suggest you use the built in backup to workstation to local USB drive, it works reliably. A restore of a backup will always include the full backup file and the incremental backup file, how else could everything be restored.
Title: Re: Help needed to restore from dar backup
Post by: holck on January 15, 2015, 08:32:21 AM
Thanks Stefano, I've used affa before with success - will try this again.