Snapshots:Example: Difference between revisions

From UMIACS
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Note that in this example, the directory ".snapshot" could also be either ".snapshots" or ".zfs/snapshot" depending on the filer serving your host. Just look for one of these three when you use the "ls -a" command.
Note that in this example, the directory <code>.snapshot</code> could also be <code>.zfs/snapshot</code> depending on the filer serving your host. You can try to 'ls' one and if it doesn't exist, try the other.


----
----


Changing to my quotes directory.
Changing to my virtual environment directory.
<pre>
<pre>
[derek@novelty quotes]$ pwd
username@host:~/virtualenv$ pwd
/nfshomes/derek/work/quotes
/nfshomes/username/virtualenv
</pre>
</pre>
I see that i have a quote called  '''redhat_sole_source_2007.doc'''.
 
I see that I have a python file called  '''virtualenv.py'''.
<pre>
<pre>
[derek@novelty quotes]$ ls
username@host:~/virtualenv$ ls
dlt_pdf_quote2007.pdf Quote_300086759.html         redhat_solesource.pdf
appveyor.yml bin              docs         MANIFEST.in  scripts    setup.py  tox.ini              virtualenv.py
dlt_pdf_quote.pdf      Quote_353511914.html        soleSource2007.pdf
AUTHORS.txt  CONTRIBUTING.rst  LICENSE.txt  README.rst   setup.cfg  tests    virtualenv_embedded  virtualenv_support
dlt_quote.pdf          Quote_367512608.html        soleSource.pdf
dy1014.xls            Quote_367884529.html        UMD_008.xls
Quote_250530976.html   redhat_sole_source_2007.doc
</pre>
</pre>
<pre>
<pre>
[derek@novelty quotes]$ ls -la redhat_sole_source_2007.doc
username@host:~/virtualenv$ ls -lah virtualenv.py
-rw-r--r-- 1 derek derek 39936 Jan 23  2007 redhat_sole_source_2007.doc
-rwxrwxr-x. 1 username username 98K Jun 12 13:54 virtualenv.py
</pre>
</pre>
I will remove it from the current file system.
I will remove it from the current file system.
<pre>
<pre>
[derek@novelty quotes]$ rm redhat_sole_source_2007.doc
username@host:~/virtualenv$ rm virtualenv.py
</pre>
</pre>
As you can see it no longer is there.
As you can see it no longer is there.
<pre>
<pre>
[derek@novelty quotes]$ ls  
username@host:~/virtualenv$ ls
dlt_pdf_quote2007.pdf Quote_250530976.html Quote_367884529.html  UMD_008.xls
appveyor.yml bin              docs        MANIFEST.in scripts    setup.py  tox.ini              virtualenv_support
dlt_pdf_quote.pdf      Quote_300086759.html redhat_solesource.pdf
AUTHORS.txt  CONTRIBUTING.rst LICENSE.txt  README.rst  setup.cfg tests    virtualenv_embedded
dlt_quote.pdf          Quote_353511914.html soleSource2007.pdf
</pre>
dy1014.xls            Quote_367512608.html soleSource.pdf
 
I am going to go into the most recent hourly snapshot, in this case: '''hourly_2018_06_15__12_00'''
<pre>
username@host:~/virtualenv$ ls /nfshomes/username/.snapshots
daily_2018_06_13__00_00  hourly_2018_06_14__04_00  hourly_2018_06_14__16_00  hourly_2018_06_15__08_00
daily_2018_06_14__00_00  hourly_2018_06_14__08_00  hourly_2018_06_14__20_00  hourly_2018_06_15__12_00
daily_2018_06_15__00_00  hourly_2018_06_14__12_00  hourly_2018_06_15__04_00 weekly_2018_06_09__00_00
</pre>
</pre>
I am going to go into the last hourly snapshot '''hourly.0'''
<pre>
<pre>
[derek@novelty quotes]$ cd .snapshot/hourly.0
username@host:~/virtualenv$ cd /nfshomes/username/.snapshots/hourly_2018_06_15__12_00/virtualenv
</pre>
</pre>
As you can see the quote is still here.
 
As you can see the file is still here.
<pre>
<pre>
[derek@novelty hourly.0]$ ls
username@host:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ ls
dlt_pdf_quote2007.pdf Quote_300086759.html         redhat_solesource.pdf
appveyor.yml bin              docs         MANIFEST.in  scripts    setup.py  tox.ini              virtualenv.py
dlt_pdf_quote.pdf      Quote_353511914.html        soleSource2007.pdf
AUTHORS.txt  CONTRIBUTING.rst  LICENSE.txt  README.rst   setup.cfg  tests    virtualenv_embedded  virtualenv_support
dlt_quote.pdf          Quote_367512608.html        soleSource.pdf
dy1014.xls            Quote_367884529.html        UMD_008.xls
Quote_250530976.html   redhat_sole_source_2007.doc
</pre>
</pre>
I copy it back to the original directory.
I copy it back to the original directory.
<pre>
<pre>
[derek@novelty hourly.0]$ cp redhat_sole_source_2007.doc /nfshomes/derek/work/quotes/
username@host:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cp virtualenv.py /nfshomes/username/virtualenv/
</pre>
</pre>
Change back to the original directory.
Change back to the original directory.
<pre>
<pre>
[derek@novelty hourly.0]$ cd /nfshomes/derek/work/quotes/
username@host:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cd /nfshomes/username/virtualenv/
</pre>
</pre>
And it is back.
And it is back.
<pre>
<pre>
[derek@novelty quotes]$ ls
username@host:~/virtualenv$ ls
dlt_pdf_quote2007.pdf Quote_300086759.html         redhat_solesource.pdf
appveyor.yml bin              docs         MANIFEST.in  scripts    setup.py  tox.ini              virtualenv.py
dlt_pdf_quote.pdf      Quote_353511914.html        soleSource2007.pdf
AUTHORS.txt  CONTRIBUTING.rst  LICENSE.txt  README.rst   setup.cfg  tests    virtualenv_embedded  virtualenv_support
dlt_quote.pdf          Quote_367512608.html        soleSource.pdf
dy1014.xls            Quote_367884529.html        UMD_008.xls
Quote_250530976.html   redhat_sole_source_2007.doc
</pre>
</pre>


[[Category:Snapshots]]
[[Category:Snapshots]]
__NOTOC__
__NOTOC__

Latest revision as of 15:29, 3 October 2023

Note that in this example, the directory .snapshot could also be .zfs/snapshot depending on the filer serving your host. You can try to 'ls' one and if it doesn't exist, try the other.


Changing to my virtual environment directory.

username@host:~/virtualenv$ pwd
/nfshomes/username/virtualenv

I see that I have a python file called virtualenv.py.

username@host:~/virtualenv$ ls
appveyor.yml  bin               docs         MANIFEST.in  scripts    setup.py  tox.ini              virtualenv.py
AUTHORS.txt   CONTRIBUTING.rst  LICENSE.txt  README.rst   setup.cfg  tests     virtualenv_embedded  virtualenv_support
username@host:~/virtualenv$ ls -lah virtualenv.py
-rwxrwxr-x. 1 username username 98K Jun 12 13:54 virtualenv.py

I will remove it from the current file system.

username@host:~/virtualenv$ rm virtualenv.py

As you can see it no longer is there.

username@host:~/virtualenv$ ls
appveyor.yml  bin               docs         MANIFEST.in  scripts    setup.py  tox.ini              virtualenv_support
AUTHORS.txt   CONTRIBUTING.rst  LICENSE.txt  README.rst   setup.cfg  tests     virtualenv_embedded

I am going to go into the most recent hourly snapshot, in this case: hourly_2018_06_15__12_00

username@host:~/virtualenv$ ls /nfshomes/username/.snapshots
daily_2018_06_13__00_00  hourly_2018_06_14__04_00  hourly_2018_06_14__16_00  hourly_2018_06_15__08_00
daily_2018_06_14__00_00  hourly_2018_06_14__08_00  hourly_2018_06_14__20_00  hourly_2018_06_15__12_00
daily_2018_06_15__00_00  hourly_2018_06_14__12_00  hourly_2018_06_15__04_00  weekly_2018_06_09__00_00
username@host:~/virtualenv$ cd /nfshomes/username/.snapshots/hourly_2018_06_15__12_00/virtualenv

As you can see the file is still here.

username@host:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ ls
appveyor.yml  bin               docs         MANIFEST.in  scripts    setup.py  tox.ini              virtualenv.py
AUTHORS.txt   CONTRIBUTING.rst  LICENSE.txt  README.rst   setup.cfg  tests     virtualenv_embedded  virtualenv_support

I copy it back to the original directory.

username@host:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cp virtualenv.py /nfshomes/username/virtualenv/

Change back to the original directory.

username@host:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cd /nfshomes/username/virtualenv/

And it is back.

username@host:~/virtualenv$ ls
appveyor.yml  bin               docs         MANIFEST.in  scripts    setup.py  tox.ini              virtualenv.py
AUTHORS.txt   CONTRIBUTING.rst  LICENSE.txt  README.rst   setup.cfg  tests     virtualenv_embedded  virtualenv_support