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.
AWS Android Ansible Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder