Restoring and snapshots
    Andrea Venturoli 
    ml at netfence.it
       
    Sat Apr 11 08:31:54 UTC 2020
    
    
  
On 2020-04-11 01:53, David Christensen wrote:
> ZFS can roll back a filesystem per a snapshot.  See zfs(8) 'rollback'. 
I know, but this is not the point of my question.
Probably I've not been that clear: let's suppose I'm restoring data from 
a ZFS system on a non ZFS filesystem.
I just have plain files and I have to deal with that.
> The ZFS analog of dump(8) is 'zfs send' and the ZFS analog of restore(8) 
> ...
Again, I know, I'm using that in other situations, but this is not the case.
> I am not sure I understand what you mean by "directories which must 
> overlap" (?).
For example, after restore, I have:
.../usr/jails/.zfs/snapshot/snapname/dc/
and
.../usr/jails/dc/.zfs/snapshot/snapname/
(This is a result of ezjail use of nullfs).
So (in my script) I cannot simply "mv" directories around, but sometimes 
I need to "merge" them.
> The numerous shells and languages each have their own idiosyncrasies 
> when it comes to spaces in file and directory names.
While I avoid whitespaces in filenames, my users unfortunately won't 
(including very creative things, like spaces at the beginning or end).
> The key concept is that each path component needs to be preserved as a 
> single unit, and not broken into pieces if it contains spaces.
Ok.
The real problem, when writing my script, is that I end up looping over 
results of `ls ...` or `find ...`. I read that is considered bad 
practice, so I asked if, maybe, there was a better way.
Up to now, it seems not...
I'm wondering if I should abandon sh and use something else (Python?).
  bye & Thanks
	av.
    
    
More information about the freebsd-questions
mailing list