Retrieving Files From Snapshot Backups
- 1 Retrieving Files From Snapshot Backups
Retrieving Files From Snapshot Backups
Sonic.net maintains nightly and daily backups of customers' data that is stored on our servers. If you would like to retrieve lost email, please refer to our Restore Deleted Email Messages article.
Retrieving lost files using the snapshots requires knowing basic Linux commands and having Sonic.net shell access. Retrieving data using the snapshots is considered an advanced feature for which Sonic.net cannot provide technical support. Sonic.net shell access can be granted to existing customers at no extra charge by calling 707.547.3400.
What are the Snapshots?
Snapshots are backups of our users' home, WWW, CGI and FTP directories that are saved automatically at regular intervals for the previous two days. Each directory contains a backup directory named .snapshot (note the "." preceding the word snapshot). You can "cd" to the .snapshot directories that are contained within each of the home, WWW, CGI and FTP directories, but you will not be able to view .snapshot directories as they are hidden.
What are the server paths to each of the .snapshot directories?
The following directories and subdirectories therein contain .snapshot backup directories.
- Home dir: ~/.snapshot
- WWW dir: /home/WWW_pages/username/.snapshot
- CGI dir: /usr/local/lib/httpd/cgi-bin/username/.snapshot
- FTP dir: /ftp/pub/users/username/.snapshot
How can I access the shell server?
Sonic.net shell access can be granted to existing customers at no extra charge by calling 707.547.3400. For additional information regarding shell access, please visit our Getting Connected FAQ.
How can I use the Snapshots to restore my data?
Connect to our shell server (shell.sonic.net). For additional information regarding shell access, please visit our Getting Connected FAQ.
Use the "cd" command to navigate to the .snapshot directory that is contained within the directory that you would like to restore.
Example: cd /home/WWW_pages/username/.snapshot
If you view the contents of the .snapshot directory using ls, you will see several subdirectories:
hourly.0 hourly.1 nightly.0
Though the names imply that snapshots are taken on an hourly and nightly basis, the "hourly" snapshots are actually taken roughly every four hours. The "hourly.0" snapshot is the most recent snapshot, "hourly.1" is from the roughly four-hour period preceding "hourly.0" and so forth. The "nightly.0" snapshot reflects the state of your data as of the previous night. Cd to the directory from which you would like to restore your data from.
Example: cd hourly.0
Use the ls -la command to see the contents of the directory. The files are as they were when the .snapshot was made. Use the cp command to copy individual files from the .snapshot directory to the directory at which you would like the files to be placed. You will need to specify the file name and the target directory path.
Example (assuming you are in in a .snapshot dir): cp example.htm /home/WWW_pages/username
In the example we are copying example.htm from the .snapshot directory to the WWW directory. NOTE: You cannot copy a file from the .snapshot directory to the target directory if the a file with the same name exists in the target directory. You will need to first rename or delete the file in the target directory before copying the file over.
You can also use the cp -r command to copy whole directories recursively from the .snapshot directories to the target directory.
Example (assuming you are in in a .snapshot dir): cp -r my_photos/ /home/WWW_pages/username/
Why do I get the error "cp: 'filename' and '/path/to/filename' are the same file"?
Copying a file from the .snapshot directory to the target location will fail if there is a file in the target directory that has the same name as the file you are copying over. You will need to first rename or delete the file in the target directory before copying the file over.