Needed to restore a local file (/etc/ssh/sshd_config) from a ufs dump.
To be safe, I chose to not overwrite the current file with the one restored from the dump, so I created a temporary folder where to restore the file to:
Then launch the restore where the format is the following:
restore -x -v -f /path/to/dump filetorestore
restore: The restore command
-x: Extract the given file from the dumpfile
-v: Be verbose
-f: the path to the ufs dump (/path/to/dump)
filetorestore: Within the dump, look for this file to restore
In a practical usage this looks like:
restore -x -v -f /mnt/remotebkp/20140401_0313-level-0/_.dump-0 ./etc/ssh/sshd_config
Verify tape and initialize maps
Tape block size is 32
Dump date: Tue Apr 1 03:13:22 2014
Dumped from: the epoch
Level 0 dump of / on mymachine.local:/dev/da0s1a
Extract directories from tape
Initialize symbol table.
Make node ./etc
Make node ./etc/ssh
Extract requested files
You have not read any tapes yet.
If you are extracting just a few files, start with the last volume
and work towards the first; restore can quickly skip tapes that
have no further files to extract. Otherwise, begin with volume 1.
Specify next volume #: 1
extract file ./etc/ssh/sshd_config
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] n
Important note: The file to be restore must start with a dot (see ./etc/ssh/sshd_config).
The reason for this is the file system structure within the dump, which can be verified in interactive mode:
restore -i -f /mnt/remotebkp/20140401_0313-level-0/_.dump-0
restore > cd etc
restore > ls
No comments yet.
Personal Internet VMware PHP Linux Shell Bluecoat Proxy Windows Hardware Virtualization Nagios MySQL DB Monitoring Mail Android Network Wyse Hacks Tomcat Postgres Apple Mac Backup BSD ZFS Solaris SmartOS Unix Multimedia Perl Database MongoDB CMS OTRS FreeBSD Wordpress LXC Nginx Proxmox DNS Graphics GlusterFS Security Chef HAProxy Icinga Ansible HTML MariaDB Containers Rancher Docker AWS ELK Kibana Logstash Filebeat Varnish PGSQL PostgreSQL ElasticSearch CouchDB Bash Macintosh Container Minio Grafana InfluxDB Databases NFS OSSEC SystemD Java Zoneminder Surveillance Elasticsearch SSL TLS Icingaweb2 Cloud Wireless Kubernetes Ubuntu