public function sync(Target $target, Result $result)
    {
        $result->debug('syncing backup');
        $storage = Storage::disk($this->filesystem);

        // if a path is specified make sure the directory exists
        if (!empty($this->path)) {
            $storage->makeDirectory($this->path);
        }
        $storage->getDriver()->writeStream(
            $this->path . '/' . $target->getFilename(),
            fopen($target->getPathname(), 'r+')
        );
    }