11-12-2010
Create a clone tree ~/.snapshot/ with every subdirectory of ~ and every file hard linked. They can delete th originals and recover them from ~/.snapshot/. A monitoring daemon can ensure that all files created are linked in soon thereafter. The path is the same path plus /.snapshot/
Now, if you want to ensure you can recover even after an overwrite, you have to copy not move. If space is a problem, the .snapshot can be a zip file. The daemon can have a directory of cksum values or trust time stamps to decide what is new to save.
I have seen facilities where ther were N snapshots holding files for N prior days, so you can recover an old version.
9 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
hello everybody,
I am trying to find the path of the Recycle Bin. I know that it's a temporary storage place, but it should have a path that we can refer to.
I want to know it because I sometimes use cygwin to work on Windows, and when you delete something with it, it's gone. I just checked... (4 Replies)
Discussion started by: milhan
4 Replies
2. Shell Programming and Scripting
Hello, I'm only taking Intro to UNIX in school right now, so please bear with me. My problem is with a sort-of recycle-bin rig I've created for fun. I'm using Ubuntu 9.04, I am the admin. (only user, actually) of this computer. I'm using this script in ~/.bashrc
# if files exist, remove contents... (6 Replies)
Discussion started by: jzacsh
6 Replies
3. Shell Programming and Scripting
Hello,
I have having problems with an assignment and am pretty desperate. My assignment is to create a shell script that does a Recycle_Bin tasks. You can only open this with PuTTY software or Knoppix. Perhaps on other software that are able to read linux language.
My part is stuck... (2 Replies)
Discussion started by: chueu
2 Replies
4. UNIX for Dummies Questions & Answers
Hi~ I have a problem with my recycle bin code.
#!/bin/bash
if test !-d ~/.recyclebin #if recycle bin does not exists
then
mkdir ~/.recyclebin # then create recycle bin
else
mv $1 ~/.recyclebin #else move the deleted file in the recycle bin
fi
so when I... (10 Replies)
Discussion started by: zel2zel
10 Replies
5. Shell Programming and Scripting
Hello, I have made a Linux Shell Script that downloads 6 files from the Internet and then deletes them. Now i want to use the function "/usr/bin/time" and "bc" to calculate how long the avergate run time for the shell script is. I therefore need to do it 100 times. My shell script code is below:
... (6 Replies)
Discussion started by: solo2
6 Replies
6. Shell Programming and Scripting
what is recycle bin mode in unix??? (4 Replies)
Discussion started by: arun508.gatike
4 Replies
7. Shell Programming and Scripting
I want to have a script both define functions and have the ability to run an external program calling one of them. This is the simplified construct:
#!/bin/bash
foo() {
echo "this is foo"
}
bar() {
echo "this is bar"
}
case "$1" in
one)
foo
;;
two)
export... (1 Reply)
Discussion started by: graysky
1 Replies
8. UNIX for Dummies Questions & Answers
Hi.
I'm started to use minix 3.2.1 recently and I'm trying to create a recycle bin for it. I'm kinda struggling on how to do it. I searched internet and I found scripts created for it but I actually didn't learn how to create scripts in college and I'm not sure if I understand them. I just wanted... (1 Reply)
Discussion started by: ReonarudoB
1 Replies
9. Shell Programming and Scripting
Hi.
I've created scripts for a recycle bin that can list, restore and empty it. I only have the problem of deleting two files with the same name. When I do it one file overwrite the other. What could I do to resolve it? The only thing I can think is asking the user to rename file before moving to... (2 Replies)
Discussion started by: ReonarudoB
2 Replies
fssnap(1M) System Administration Commands fssnap(1M)
NAME
fssnap - create temporary snapshots of a file system
SYNOPSIS
fssnap [-F FSType] [-V] -o special_options /mount/point
fssnap -d [-F FSType] [-V] /mount/point | dev
fssnap -i [-F FSType] [-V] [-o special_options] [/mount/point | dev]
DESCRIPTION
The fssnap command creates a stable, read-only snapshot of a file system when given either an active mount point or a special device con-
taining a mounted file system, as in the first form of the synopsis. A snapshot is a temporary image of a file system intended for backup
operations.
While the snapshot file system is stable and consistent, an application updating files when the snapshot is created might leave these files
in an internally inconsistent, truncated, or otherwise unusable state. In such a case, the snapshot will contain these partially written or
corrupted files. It is a good idea to ensure active applications are suspended or checkpointed and their associated files are also consis-
tent during snapshot creation.
File access times are not updated while the snapshot is being created.
A path to the virtual device that contains this snapshot is printed to standard output when a snapshot is created.
OPTIONS
The following options are supported:
-d Deletes the snapshot associated with the given file system.
-F FSType Specifies the file system type to be used. The FSType should either be specified here or be determined by matching
the block special device with an entry in the /etc/vfstab table, or by consulting /etc/default/fs.
-i Displays the state of any given FSType snapshot. If a mount-point or device is not given, a list of all snapshots
on the system is displayed. When a mount-point or device is specified, detailed information is provided for the
specified file system snapshot by default. The format and meaning of this information is file-system dependent. See
the FSType-specific fssnap man page for details.
-o special_options See the FSType-specific man page for fssnap.
-V Echoes the complete command line, but does not execute the command.
OPERANDS
The following operands are supported:
/mount/point The directory where the file system resides.
EXAMPLES
See FSType-specific man pages for examples.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/etc/vfstab Specifies file system type.
/etc/default/fs Specifies the default local file system type.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
fssnap_ufs(1M), attributes(5)
NOTES
This command might not be supported for all FSTypes.
SunOS 5.10 11 Aug 2004 fssnap(1M)