This document provides a synopsis of the possible options that can be specified by the user of a laptop device that is protected by the ictp_restic command-line utility. All options require an internet connection.
Please open your command-line, cmd or terminal application to issue use any of the commands documented below.
status: This option allows the end user to check the status of backups, it does not require additional parameters. The output will show all the backup-snapshots that exist on the server. Each line of output begins with a snapshot identifier (id) and is followed by the date and time on which the backup was performed.
Example:
ictp_restic status
list: This command is used to list all the files contained in a backup snapshot. Valid values of snapshot_id may be obtained from the output of the "status" option.
Example:
ictp_restic list ba5f048e
ictp_restic list latest
search: This command is used to search for a file or directory. A point-in-time search may be performed by optionally specifying one or more backup snapshots using the -s sub-option (NOTE: each snapshot id must be preceeded by the -s option).
Example:
ictp_restic search /usr/local
ictp_restic search -s ba5f048e yed
ictp-update: This option is used to perform an immediate update of the ictp_restic script, configuration files, exclude files and restic binary from the ICTP server. This command is automatically performed once daily.
Example:
ictp_restic ictp-update
restore-file: The restore-file option is used to recover files from latest backup as shown in the example below.
Example:
ictp_restic restore-file "C:\Users\testuer\My Documents\test-file.docx"
restore-dir: The restore-dir option is used to recover directories from latest backup as shown in the example below.
Example:
ictp_restic restore-dir "C:\Users\testuser\My Documents\"
restore: The restore option is used to recover an entire snapshot or several files from latest backup (specified by the codename latest). The --path sub-option can be used to select the latest snapshot containing a path. Possible values for the --path sub-option include /usr/local /etc /home /Users, etc. Performing a point-in-time restore operation is possible by specifying a snapshot id from which to perform the restore operation. It is necessary to add the "-t /" sub-option in order to perform restores to original location otherwise, simply replace the / of the -t sub-option with a suitable directory to perform restore operation to a new location. The files/directories to be restored should be passed in using the --include (for case sensitve match) or --iinclude (for case-insensitive match) sub-option as shown in the example below.
Example:
ictp_restic restore -t / latest
ictp_restic restore --path /usr/local -t /tmp latest
ictp_restic restore -t / --iinclude /usr/local/bin/yed ba5f048e
backup: The backup option is used to request an immediate backup of the automatically designated folders which may include C:\Users, /usr/local, /etc, /Users, /root and /home according to the client operating system. However, additional directories/locations may be specified by passing them as sub options to the backup option.
Example:
ictp_restic backup
ictp_restic backup /opt
autobackup: The autobackup option is used to perform automatic scheduled backup operations. In this mode, the backup would be performed if less than 6 backups have been perform in the day and it is roughly over 2 hours since the last successful backup was performed.
Example:
ictp_restic autobackup