diff --git a/archivers/README b/archivers/README deleted file mode 100644 index 429e907..0000000 --- a/archivers/README +++ /dev/null @@ -1,54 +0,0 @@ -# lz.sh (lz and uz) # - -The lz.sh script emulates and extends commands lz and uz from the -mtools. - -NOTE: although lz.sh is more powerful than mtools' lz and uz, you should -probably use als and aunpack from the atool package instead; they are -much better and atool provides several other useful commands as well. -This script is still useful when you can't install Perl (atool is -written in Perl). - -This script handles the following archive formats through the standards -options of GNU Tar: -- tar -- tar.gz (tgz) -- tar.bz2 (tbz, tb2) -- tar.xz (txz) -- tar.lzma (tlz) -- tar.Z (taz) - -Note that you need GNU Tar, at least version 1.20 to support LZMA -compressed archives, and version 1.22 for XZ compressed ones. - -If the script name is "lz", the archive content is displayed. If the -name is "uz", it is extracted. - -To install lz and uz, move put script in a directory in the PATH (for -instance /usr/local/bin) and hard link it to uz: - cp lz.sh /usr/local/bin/lz - ln /usr/local/bin/{lz,uz} - -Alternatively, you can use directly the symbolic links provided along -with the repository by adding the "bin" directory to your PATH, as -explained in the main README file. - - -# xzize.sh # - -The xzize script compresses an uncompressed file, or recompresses a -compressed file to xz (with default compression level). - -Known compression formats are GZip (.gz), BZip2 (.bz2), LZMA (.lzma), -and Lempel-Ziv (.Z). Short tar compressed suffixes are also allowed: -.tgz, .tbz, .tb2, .tlz, .taz. - -In case of recompression, the original compressed file is kept. In -case of compression (i.e. when the suffix of the file does not -correspond to a known compression format), the original uncompressed -file is removed. - -NOTE: the atool package provides the arepack command, which can -recompress to several formats and not only to xz. xzize has the -advantage to recompress on the fly rather than unpacking the archive -entirely on the file system and repacking it afterwards. diff --git a/archivers/README.md b/archivers/README.md new file mode 100644 index 0000000..c9c041e --- /dev/null +++ b/archivers/README.md @@ -0,0 +1,55 @@ +lz.sh (lz and uz) +================= + +The `lz.sh` script emulates and extends commands `lz` and `uz` from the mtools. + +**Note**: although `lz.sh` is more powerful than mtools' `lz` and `uz`, you +should probably use `als` and `aunpack` from the atool package instead; they +are much better and atool provides several other useful commands as well. This +script is still useful when you can't install Perl (atool is written in Perl). + +This script handles the following archive formats through the standards options +of GNU Tar: + +- tar +- tar.gz (tgz) +- tar.bz2 (tbz, tb2) +- tar.xz (txz) +- tar.lzma (tlz) +- tar.Z (taz) + +Note that you need GNU Tar, at least version 1.20 to support LZMA compressed +archives, and version 1.22 for XZ compressed ones. + +If the script is called as `lz`, the archive content is displayed. When called +as `uz`, it is extracted. + +To install `lz` and `uz`, move the script as `lz` in a directory in your `PATH` +(for instance `/usr/local/bin` or `$HOME/bin`) and hard link it to `uz`: + + cp lz.sh /usr/local/bin/lz + ln /usr/local/bin/{lz,uz} + +Alternatively, you can use the symbolic links provided along with the +repository by adding the `bin` directory to your `PATH`, as explained in the +main `README.md` file. + + +xzize.sh +======== + +The `xzize.sh` script compresses an uncompressed file, or recompresses a +compressed file to XZ (with default compression level). + +Known compression formats are GZip (.gz), BZip2 (.bz2), LZMA (.lzma), and +Lempel-Ziv (.Z). Short tar compressed suffixes are also allowed: .tgz, .tbz, +.tb2, .tlz, .taz. + +In case of recompression, the original compressed file is kept. In case of +compression (i.e. when the suffix of the file does not correspond to a known +compression format), the original uncompressed file is removed. + +**Note**: the atool package provides the `arepack` command, which can +recompress to several formats and not only to XZ. `xzize` has the advantage to +recompress on the fly rather than unpacking the archive entirely on the file +system and repacking it afterwards. diff --git a/backup/README b/backup/README deleted file mode 100644 index c6d0e3b..0000000 --- a/backup/README +++ /dev/null @@ -1,32 +0,0 @@ -# obstinate-rsync.sh # - -obstinate-rsync.sh is a simple script that transfers a single directory -(your home directory, by default) to a remote host, using rsync. You can -specify exclude patterns in a file (~/.backup-excludes by default). The -transfer will be reattempted until it succeeds. - -Edit the script to configure the protocol, host, directories, etc. - - -# btrfs_snapshot_date.sh # - -This script is a wrapper to btrfs subvolume snapshot, that creates a -snapshot of a subvolume, the snapshot's name being the subvolume name -with the current date and time appended to it. - -It is supposed that the subvolume to snapshot resides in a directory -which needs to be mounted before to make the snapshot (for example if -you defined your default subvolume to your system's root, and mount the -volume 0 on /media/pool). - -Edit the script to configure the directories (and to understand what is -being done). - - -# backup_sites_mysql.sh # - -The script backup_sites_mysql.sh is designed to save websites data files -and the associated MySQL databases. - -You need to edit the script to configure the databases you want to backup -and the directory containing all your websites. diff --git a/backup/README.md b/backup/README.md new file mode 100644 index 0000000..6c5001e --- /dev/null +++ b/backup/README.md @@ -0,0 +1,35 @@ +obstinate-rsync.sh +================== + +`obstinate-rsync.sh` is a simple script that transfers a single directory (your +home directory, by default) to a remote host, using rsync. You can specify +exclude patterns in a file (`~/.backup-excludes` by default). The transfer will +be reattempted until it succeeds. + +Edit the script to configure the protocol, host, directories, etc. + + +btrfs_snapshot_date.sh +====================== + +This script is a wrapper to `btrfs subvolume snapshot`, that creates a snapshot +of a subvolume, the snapshot's name being the subvolume name with the current +date and time appended to it. + +It is assumed that the subvolume to snapshot resides in a directory which needs +to be mounted before making the snapshot (for example if you defined your +default subvolume to your system's root, and mount the volume 0 on +`/media/pool`). + +Edit the script to configure the directories (and to understand what is being +done). + + +backup_sites_mysql.sh +===================== + +This script is designed to save websites data files and the associated MySQL +databases. + +You need to edit the script to configure the databases you want to backup and +the directory containing all of your websites' files (the “document root”). diff --git a/file_utils/README b/file_utils/README deleted file mode 100644 index 6ab0399..0000000 --- a/file_utils/README +++ /dev/null @@ -1,79 +0,0 @@ -# dirpacker.py # - -This scripts allows to group (pack) a bunch of files or directories into -fixed-size volumes, optimizing the occupied size of the volumes. The -original use case was to burn MP3 albums to CD-ROMs to play them in the -car, but minimize the wasted space of each disc. Of course, it can be -used to backup any kind of files to any kind of medium. - -The particularity of this program, compared for example to datapacker -(from which it is loosely inspired) is that it works with directories -instead of regular files only. The files inside a directory won't be -separated on several archives, they will be on the same volume. - -Note: I kept the datapacker's terminology in which a volume is also -called a bin. - -The default bin size is 703 MiB, i.e. the capacity of a 80-minute -CD-ROM; note that this can lead to slightly exceed the capacity when -actually burning the disc, so if you don't want to overburn a few -hundreds KiB, choose a lower bin size (702 MiB should be fine). - -By default, dirpacker displays a list of bins and the files they -would contain, along with the size of each file and some statistics. -With the option --machine-readable, this list will be printed in a -machine-readable format: each line contains a bin's name, then a -tabulation, then a file that belongs to this bin. - -With the option --move, a directory will be created for each volume and -the files will be moved to the corresponding volume. - -To see the full usage, call the program with -h. - - -# mvparent.sh # - -mvparent.sh was originally written to be integrated in the ROX-Filer -directory "Send to" menu (and was named mv_here.sh). It moves the -contents of a directory into its parent directory, then deletes the -empty directory. - -To install this script, just copy it in a directory which is in the -PATH, e.g. /usr/local/bin: - cp mvparent.sh /usr/local/bin - -If you want to integrate it in ROX-Filer: - mkdir -p ~/.config/rox.sourceforge.net/SendTo/.inode_directory - cd ~/.config/rox.sourceforge.net/SendTo/.inode_directory - ln -s `which mvparent.sh` "Move here" - - -# unln.py # - -I wrote this script after accidentally merging all my "duplicate" files -with the cleaning tool fslint (thanks guys for a totally confusing clear -UI!). It does the opposite than the ln command, that is separate file -names given as arguments from their respective inodes by doing the -equivalent of (cp -p file tmp && mv tmp file). Checks are done in order -to work only on regular files which have more than one hard link, so the -minimal amount of copies are done. - -A summary of the file names on which errors were raised is displayed at -the end of the execution. Note that if a file is under a directory which -is not executable (i.e. the program can't cd in), it will be considered -as inexistant and ignored, and its name won't be displayed. - -/!\ Warning: the copy function used is shutil.copy2(), which tries to - preserve all the metadata it can, but as of Python 3.3 it is not - guaranteed that extended attributes will be preserved. See the - documentation for details: - http://docs.python.org/3/library/shutil.html - -/!\ FILE OWNER AND GROUP CANNOT BE PRESERVED, as a file is always - created with the current user's UID and GID. - -Tip: if you have a file listing all the file names you want to work on, -with one name per line, you can use xargs with --delimiter='\n': - xargs --delimiter='\n' . + +/!\ **Warning #2**: file owner and group cannot be preserved, as a file is +always created (upon copy, in our case) with the current user's UID and GID. + +**Tip**: if you have a file listing all the file names you want to work on, +with one name per line, you can use `xargs` with `--delimiter='\n'`: + + xargs --delimiter='\n'