hiw to backup and restore RETENTION POLICIES?
Hi @Hillbun_Ng ,
you can specify -rp in the backup and in the restore command
$ influxd backup -h Creates a backup copy of specified InfluxDB OSS database(s) and saves the files in an Enterprise-compatible format to PATH (directory where backups are saved). Usage: influxd backup [options] PATH -portable Required to generate backup files in a portable format that can be restored to InfluxDB OSS or InfluxDB Enterprise. Use unless the legacy backup is required. -host <host:port> InfluxDB OSS host to back up from. Optional. Defaults to 127.0.0.1:8088. -db <name> InfluxDB OSS database name to back up. Optional. If not specified, all databases are backed up when using '-portable'. -rp <name> Retention policy to use for the backup. Optional. If not specified, all retention policies are used by default. -shard <id> The identifier of the shard to back up. Optional. If specified, '-rp <rp_name>' is required. -start <2015-12-24T08:12:23Z> Include all points starting with specified timestamp (RFC3339 format). Not compatible with '-since <timestamp>'. -end <2015-12-24T08:12:23Z> Exclude all points after timestamp (RFC3339 format). Not compatible with '-since <timestamp>'. -since <2015-12-24T08:12:23Z> Create an incremental backup of all points after the timestamp (RFC3339 format). Optional. Recommend using '-start <timestamp>' instead. -skip-errors Optional flag to continue backing up the remaining shards when the current shard fails to backup. backup: flag: help requested $ influxd restore -h Uses backup copies from the specified PATH to restore databases or specific shards from InfluxDB OSS or InfluxDB Enterprise to an InfluxDB OSS instance. Usage: influxd restore -portable [options] PATH Note: Restore using the '-portable' option consumes files in an improved Enterprise-compatible format that includes a file manifest. Options: -portable Required to activate the portable restore mode. If not specified, the legacy restore mode is used. -host <host:port> InfluxDB OSS host to connect to where the data will be restored. Defaults to '127.0.0.1:8088'. -db <name> Name of database to be restored from the backup (InfluxDB OSS or InfluxDB Enterprise) -newdb <name> Name of the InfluxDB OSS database into which the archived data will be imported on the target system. Optional. If not given, then the value of '-db <db_name>' is used. The new database name must be unique to the target system. -rp <name> Name of retention policy from the backup that will be restored. Optional. Requires that '-db <db_name>' is specified. -newrp <name> Name of the retention policy to be created on the target system. Optional. Requires that '-rp <rp_name>' is set. If not given, the '-rp <rp_name>' value is used. -shard <id> Identifier of the shard to be restored. Optional. If specified, then '-db <db_name>' and '-rp <rp_name>' are required. PATH Path to directory containing the backup files. restore: flag: help requested