Answer the question
In order to leave comments, you need to log in
Samba 4, ZFS and Windows 10 - blank "previous versions" tab?
I have a small file server based on Debian 8 and Samba 4.2. I want to make it so that clients from Windows 10 machines can view and restore previous versions of files on network shares (once I already set up a similar file server on a Windows 2003 server, and it worked well and conveniently there). I raised the ZFS file system, configured the creation of snapshots every hour, the snapshots are created normally, and I can view them from the server console. But if you go to a network folder and open "properties" - "previous versions", the tab is always empty. I tried to build the latest (4.5.5) Samba from the sources from the site - the result is the same. What could be the problem?
In Samba itself, in the settings, I wrote according to the manual:
[test]
comment = test
writable = yes
directory mask = 0777
guest ok = Yes
path = /tank/test
create mask = 0666
read only = No
# Stuff for ZFS Snapshots
vfs objects = shadow_copy2
shadow:snapdir = /tank/test/.zfs/snapshot
shadow:basedir = /tank/test
Answer the question
In order to leave comments, you need to log in
On my FreeNas, samba is configured like this:
[Office]
path = /mnt/tank/Office
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
shadow:snapdir = .zfs/snapshot
shadow:sort = desc
shadow:localtime = yes
shadow:format = auto-%Y%m%d.%H%M-2w
shadow:snapdirseverywhere = yes
vfs objects = shadow_copy2 zfs_space zfsacl aio_pthread
Yes, once again I believed everything, the problem was in the shadow: format. Configured like this: shadow:format= %Y-%m-%d_%H.%M.%S--8w
Snapshots are created automatically via zfSnap and look like tank/[email protected]_17.00.01--8w /etc/init.d/samba restart and copies appeared in the Explorer tab. True, a not entirely clear moment with the data, it seems that Samba takes the file date directly from the file modification date (ignoring the format in the snapshot name), and takes the folder date from the snapshot name, ignoring the actual modification date. Thank you all for your participation.
https://symfony.com/doc/current/http_cache.html
You cannot clear symfony http-cache out of the box, you can use the command:
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpKernel\Kernel;
class HttpCacheClearCommand extends Command
{
/**
* @var string
*/
private $cacheDir;
public function __construct($name, $cacheDir)
{
parent::__construct($name);
$this->cacheDir = $cacheDir;
}
protected function configure()
{
$this
->setDescription('Clear http-cache')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$exec = sprintf('rm -rf %s/*', $this->cacheDir);
exec($exec);
}
}
bin/console cache:pool:clear
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question