Skip to contents

Zip cloud folder and download to local zip file. Default file name: <backup_dir>/cloud-backup_<base_name>_<yyyy-mm-dd-HHMM>.zip

Usage

backup_cloud_folder(
  path,
  target_file = get_download_target_file(base_name, backup_dir),
  user = nextcloud_user(),
  auth = nextcloud_auth(),
  backup_dir = kwb.utils::createDirectory("~/../Downloads/nextcloud-backups"),
  base_name = basename(path)
)

Arguments

path

path to folder on the cloud

target_file

path to the target file. A default path is provided by get_download_target_file(base_name, backup_dir)

user

user name, by default taken from the environment variable "NEXTCLOUD_USER".

auth

authentication header as provided by kwb.nextcloud:::nextcloud_auth

backup_dir

directory into which to download the zip-file

base_name

base name to be integrated into the name of the downloaded file