Difference between revisions of "Snapshots:Example"

From UMIACS
Jump to navigation Jump to search
m
 
(5 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 ".snapshots" could also be ".zfs/snapshot" or "ifs/.snapshot" depending on the filer serving your host. You can try to 'ls' one and if it doesn't exist try one of the others.
  
 
----
 
----
Line 30: Line 30:
 
I am going to go into the most recent hourly snapshot, in this case: '''hourly_2018_06_15__12_00'''
 
I am going to go into the most recent hourly snapshot, in this case: '''hourly_2018_06_15__12_00'''
 
<pre>
 
<pre>
sattwood@zaphod:~/virtualenv$ ls .snapshots
+
sattwood@zaphod:~/virtualenv$ ls /nfshomes/sattwood/.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_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_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
+
daily_2018_06_15__00_00  hourly_2018_06_14__12_00  hourly_2018_06_15__04_00 weekly_2018_06_09__00_00
sattwood@zaphod:~/virtualenv$ cd .snapshots/hourly_2018_06_15__12_00/
+
</pre>
 +
<pre>
 +
sattwood@zaphod:~/virtualenv$ cd /nfshomes/sattwood/.snapshots/hourly_2018_06_15__12_00/virtualenv
 
</pre>
 
</pre>
 
As you can see the file is still here.
 
As you can see the file is still here.
 
<pre>
 
<pre>
sattwood@zaphod:~/virtualenv/.snapshots/hourly_2018_06_15__12_00$ ls
+
sattwood@zaphod:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ ls
 
appveyor.yml  bin              docs        MANIFEST.in  scripts    setup.py  tox.ini              virtualenv.py
 
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
 
AUTHORS.txt  CONTRIBUTING.rst  LICENSE.txt  README.rst  setup.cfg  tests    virtualenv_embedded  virtualenv_support
Line 44: Line 46:
 
I copy it back to the original directory.
 
I copy it back to the original directory.
 
<pre>
 
<pre>
sattwood@zaphod:~/virtualenv/.snapshots/hourly_2018_06_15__12_00$ cp virtualenv.py /nfshomes/sattwood/virtualenv/
+
sattwood@zaphod:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cp virtualenv.py /nfshomes/sattwood/virtualenv/
 
</pre>
 
</pre>
 
Change back to the original directory.
 
Change back to the original directory.
 
<pre>
 
<pre>
sattwood@zaphod:~/virtualenv/.snapshots/hourly_2018_06_15__12_00$ cd /nfshomes/sattwood/virtualenv/
+
sattwood@zaphod:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cd /nfshomes/sattwood/virtualenv/
 
</pre>
 
</pre>
 
And it is back.
 
And it is back.

Latest revision as of 19:36, 9 November 2020

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


Changing to my virtual environment directory.

sattwood@zaphod:~/virtualenv$ pwd
/nfshomes/sattwood/virtualenv

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

sattwood@zaphod:~/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
sattwood@zaphod:~/virtualenv$ ls -lah virtualenv.py
-rwxrwxr-x. 1 sattwood sattwood 98K Jun 12 13:54 virtualenv.py

I will remove it from the current file system.

sattwood@zaphod:~/virtualenv$ rm virtualenv.py

As you can see it no longer is there.

sattwood@zaphod:~/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

sattwood@zaphod:~/virtualenv$ ls /nfshomes/sattwood/.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
sattwood@zaphod:~/virtualenv$ cd /nfshomes/sattwood/.snapshots/hourly_2018_06_15__12_00/virtualenv

As you can see the file is still here.

sattwood@zaphod:~/.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.

sattwood@zaphod:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cp virtualenv.py /nfshomes/sattwood/virtualenv/

Change back to the original directory.

sattwood@zaphod:~/.snapshots/hourly_2018_06_15__12_00/virtualenv$ cd /nfshomes/sattwood/virtualenv/

And it is back.

sattwood@zaphod:~/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