Koozali.org: home of the SME Server

Help needed to restore from dar backup

Offline holck

  • *
  • 322
  • +1/-0
Help needed to restore from dar backup
« 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
  • Make a full backup on the old machine (will take some time ...)
  • Restore from this full backup on the new machine (will also take some time ...)
  • Take the old machine off the network
  • Make an incremental backup on the old machine (this should be quite small)
  • Restore from this incremental backup on the new machine (should be quick)
  • Test, and put the new machine in service
But I need to be sure that dar
  • only spends time overwriting files on the new machine that have recently been changed on the old
  • deletes files on the new machine that have recently been deleted on the old machine

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?
......

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: Help needed to restore from dar backup
« Reply #1 on: January 10, 2015, 06:38:22 PM »
search for affa..

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Help needed to restore from dar backup
« Reply #2 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.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline holck

  • *
  • 322
  • +1/-0
Re: Help needed to restore from dar backup
« Reply #3 on: January 15, 2015, 08:32:21 AM »
Thanks Stefano, I've used affa before with success - will try this again.
......