[-]
[+]
|
Changed |
_service:tar_git:fsarchiver.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,8 +1,8 @@
<services>
<service name="tar_git">
- <param name="url">https://github.com/sailfishos-sony-tama/pkg-fsarchiver.git</param>
+ <param name="url">https://github.com/sailfishos-chum/fsarchiver.git</param>
<param name="branch">master</param>
- <param name="revision">0.8.5</param>
+ <param name="revision">0.8.6</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/ChangeLog
^
|
@@ -1,5 +1,10 @@
fsarchiver: Filesystem Archiver for Linux [http://www.fsarchiver.org]
=====================================================================
+* 0.8.6 (2021-02-27):
+ - Add support for EXT4 fast_commit feature (Marcos Mello)
+ - Add support for XFS features inobtcount and bigtime (Marcos Mello)
+ - Fix handling of compression options on the command line (Marcos Mello)
+ - Specify device as the last argument in mkfs calls (Marcos Mello)
* 0.8.5 (2018-07-10):
- Improved support for extfs filesystems (Contribution from Marcos Mello)
- Fixed build issue with e2fsprogs < 1.41 (Contribution from Marcos Mello)
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/Makefile.am
^
|
@@ -1,6 +1,6 @@
SUBDIRS = src doc
-EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README website distrib internals autogen.sh
+EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README distrib internals autogen.sh
static:
rm -f src/fsarchiver
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/configure.ac
^
|
@@ -3,12 +3,12 @@
AC_PREREQ(2.59)
-AC_INIT([fsarchiver], 0.8.5)
-AC_DEFINE([PACKAGE_RELDATE], "2018-07-10", [Define the date of the release])
+AC_INIT([fsarchiver], 0.8.6)
+AC_DEFINE([PACKAGE_RELDATE], "2021-02-27", [Define the date of the release])
AC_DEFINE([PACKAGE_FILEFMT], "FsArCh_002", [Define the version of the file format])
AC_DEFINE([PACKAGE_VERSION_A], 0, [Major version number])
AC_DEFINE([PACKAGE_VERSION_B], 8, [Medium version number])
-AC_DEFINE([PACKAGE_VERSION_C], 5, [Minor version number])
+AC_DEFINE([PACKAGE_VERSION_C], 6, [Minor version number])
AC_DEFINE([PACKAGE_VERSION_D], 0, [Patch version number])
AC_CANONICAL_HOST([])
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/distrib/rpm/fsarchiver.spec
^
|
@@ -1,5 +1,5 @@
Name: fsarchiver
-Version: 0.8.5
+Version: 0.8.6
Release: 1%{?dist}
Summary: Safe and flexible file-system backup/deployment tool
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/doc/fsarchiver.8
^
|
@@ -17,8 +17,6 @@
http://www.fsarchiver.org
.SS Quick Start guide:
http://www.fsarchiver.org/quickstart/
-.SS Forums where to ask questions:
-http://www.fsarchiver.org/forums/
.SS Git repository:
https://github.com/fdupoux/fsarchiver
.SS Report a bug:
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/archinfo.c
^
|
@@ -85,6 +85,7 @@
{
char magic[FSA_SIZEOF_MAGIC+1];
char fsbuf[FSA_MAX_FSNAMELEN];
+ u32 temp32;
u64 temp64;
u64 fsbytestotal;
u64 fsbytesused;
@@ -122,10 +123,12 @@
if (dico_get_string(dicofshead, 0, FSYSHEADKEY_ORIGDEV, fsorigdev, sizeof(fsorigdev))<0)
snprintf(fsorigdev, sizeof(fsorigdev), "<unknown>");
- // filesystem uuid: maybe an ntfs uuid or an unix uuid
+ // filesystem uuid: maybe an ntfs uuid, fat serial or an unix uuid
snprintf(fsuuid, sizeof(fsuuid), "<none>");
if (dico_get_u64(dicofshead, 0, FSYSHEADKEY_NTFSUUID, &temp64)==0)
snprintf(fsuuid, sizeof(fsuuid), "%016llX", (long long unsigned int)temp64);
+ else if (dico_get_u32(dicofshead, 0, FSYSHEADKEY_FSVFATSERIAL, &temp32)==0)
+ snprintf(fsuuid, sizeof(fsuuid), "%08lX", (long unsigned int)temp32);
else if (dico_get_string(dicofshead, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 && strlen(buffer)==36)
snprintf(fsuuid, sizeof(fsuuid), "%s", buffer);
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/common.c
^
|
@@ -27,12 +27,14 @@
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/stat.h>
+#include <sys/utsname.h>
#include <fcntl.h>
#include <stdlib.h>
#include <wordexp.h>
#include <fnmatch.h>
#include <time.h>
#include <limits.h>
+#include <regex.h>
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
@@ -630,3 +632,23 @@
return devsize;
}
+
+bool match_uname_r(char *ere)
+{
+ int r;
+ struct utsname ut;
+ regex_t reg;
+
+ if (uname(&ut) != 0)
+ return false;
+
+ // do not bother with invalid regex, since it is not user configurable
+ if (regcomp(®, ere, REG_EXTENDED|REG_NOSUB) != 0)
+ return false;
+
+ r = !regexec(®, ut.release, 0, NULL, 0);
+
+ msgprintf(MSG_VERB2, "match_uname_r(%s)=[%s], kernel=[%s]\n", ere, r ? "true" : "false", ut.release);
+
+ return r;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/common.h
^
|
@@ -51,5 +51,6 @@
int exclude_check(struct s_strlist *patlist, char *string);
int get_path_to_volume(char *newvolbuf, int bufsize, char *basepath, long curvol);
s64 get_device_size(char *partition);
+bool match_uname_r(char *ere);
#endif // __COMMON_H__
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_btrfs.c
^
|
@@ -87,8 +87,6 @@
// ---- set the advanced filesystem settings from the dico
memset(options, 0, sizeof(options));
- strlcatf(options, sizeof(options), " %s ", fsoptions);
-
if (strlen(mkfslabel) > 0)
strlcatf(options, sizeof(options), " -L '%s' ", mkfslabel);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0)
@@ -101,8 +99,11 @@
if (dico_get_u64(d, 0, FSYSHEADKEY_FSBTRFSSECTORSIZE, &temp64)==0)
strlcatf(options, sizeof(options), " -s %ld ", (long)temp64);
-
- if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.btrfs -f %s %s", partition, options)!=0 || exitst!=0)
+
+ // ---- mkfsopt from command line
+ strlcatf(options, sizeof(options), " %s ", fsoptions);
+
+ if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.btrfs -f %s %s", options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed\n", command);
return -1;
}
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_ext2.c
^
|
@@ -51,13 +51,22 @@
};
// These are the features to be passed on the command line (cf "man ext4")
-struct s_features mkfeatures[] = // cf e2fsprogs-1.44.0/lib/e2p/feature.c
+//
+// metadata_csum_seed feature allows UUID change on mounted filesystems and configures an incompat
+// flag (EXT4_FEATURE_INCOMPAT_CSUM_SEED) bumping minimum kernel version to linux-4.4. Since
+// FSArchiver always creates the filesystem from scratch and sets up the UUID via mke2fs -U in
+// case metadata_csum is going to be used (mke2fs 1.43+), metadata_csum_seed brings no value for
+// us and therefore is not preserved (i.e. present in FSA_FEATURE_INCOMPAT_SUPP but not listed
+// below). Users can easily enable it with tune2fs if desired.
+//
+struct s_features mkfeatures[] = // cf e2fsprogs-1.46.0/lib/e2p/feature.c
{
{"has_journal", FSA_EXT3_FEATURE_COMPAT_HAS_JOURNAL, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT3, PROGVER(1,39,0)},
{"ext_attr", FSA_EXT2_FEATURE_COMPAT_EXT_ATTR, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT2, PROGVER(1,40,5)},
{"resize_inode", FSA_EXT2_FEATURE_COMPAT_RESIZE_INODE, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT2, PROGVER(1,39,0)},
{"dir_index", FSA_EXT2_FEATURE_COMPAT_DIR_INDEX, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT2, PROGVER(1,33,0)},
{"sparse_super2", FSA_EXT4_FEATURE_COMPAT_SPARSE_SUPER2, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT4, PROGVER(1,42,10)},
+ {"fast_commit", FSA_EXT4_FEATURE_COMPAT_FAST_COMMIT, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT4, PROGVER(1,46,0)},
{"filetype", FSA_EXT2_FEATURE_INCOMPAT_FILETYPE, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT2, PROGVER(1,16,0)},
{"extent", FSA_EXT4_FEATURE_INCOMPAT_EXTENTS, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT4, PROGVER(1,41,0)},
{"journal_dev", FSA_EXT3_FEATURE_INCOMPAT_JOURNAL_DEV, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT3, PROGVER(1,39,0)},
@@ -202,8 +211,6 @@
// "mke2fs -F" removes confirmation prompt when device is a whole disk such as /dev/sda
strlcatf(options, sizeof(options), " -F ");
- strlcatf(options, sizeof(options), " %s ", fsoptions);
-
strlcatf(options, sizeof(options), " -b %ld ", (long)devblksize);
// ---- set the advanced filesystem settings from the dico
@@ -367,9 +374,12 @@
if ((dico_get_u64(d, 0, FSYSHEADKEY_FSEXTEOPTRAIDSTRIPEWIDTH, &temp64)==0) && e2fstoolsver>=PROGVER(1,40,7))
strlcatf(options, sizeof(options), " -E stripe-width=%ld ", (long)temp64);
+ // ---- mkfsopt from command line
+ strlcatf(options, sizeof(options), " %s ", fsoptions);
+
// ---- execute mke2fs
msgprintf(MSG_VERB2, "exec: %s\n", command);
- if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "%s %s %s", progname, partition, options)!=0 || exitst!=0)
+ if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "%s %s %s", progname, options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed with return status=%d\n", command, exitst);
ret=-1;
goto extfs_mkfs_cleanup;
@@ -392,7 +402,7 @@
if (options[0])
{
- if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "tune2fs %s %s", partition, options)!=0 || exitst!=0)
+ if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "tune2fs %s %s", options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed with return status=%d\n", command, exitst);
ret=-1;
goto extfs_mkfs_cleanup;
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_ext2.h
^
|
@@ -47,6 +47,8 @@
#define FSA_EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
#define FSA_EXT2_FEATURE_COMPAT_LAZY_BG 0x0040
#define FSA_EXT4_FEATURE_COMPAT_SPARSE_SUPER2 0x0200
+#define FSA_EXT4_FEATURE_COMPAT_FAST_COMMIT 0x0400
+#define FSA_EXT4_FEATURE_COMPAT_STABLE_INODES 0x0800
/* for s_feature_ro_compat */
#define FSA_EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
@@ -77,6 +79,7 @@
#define FSA_EXT4_FEATURE_INCOMPAT_LARGEDIR 0x4000
#define FSA_EXT4_FEATURE_INCOMPAT_INLINEDATA 0x8000
#define FSA_EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
+#define FSA_EXT4_FEATURE_INCOMPAT_CASEFOLD 0x20000
#define FSA_EXT2_FEATURE_COMPAT_SUPP FSA_EXT2_FEATURE_COMPAT_EXT_ATTR
#define FSA_EXT2_FEATURE_INCOMPAT_SUPP (FSA_EXT2_FEATURE_INCOMPAT_FILETYPE| \
@@ -98,14 +101,15 @@
#define FSA_EXT3_FEATURE_RO_COMPAT_UNSUPPORTED ~FSA_EXT3_FEATURE_RO_COMPAT_SUPP
// -------------- features supported by the current fsarchiver version --------------------
-#define FSA_FEATURE_COMPAT_SUPP (u64)(FSA_EXT2_FEATURE_COMPAT_DIR_PREALLOC| \
- FSA_EXT2_FEATURE_COMPAT_IMAGIC_INODES| \
- FSA_EXT3_FEATURE_COMPAT_HAS_JOURNAL| \
- FSA_EXT2_FEATURE_COMPAT_EXT_ATTR| \
- FSA_EXT2_FEATURE_COMPAT_RESIZE_INODE| \
- FSA_EXT2_FEATURE_COMPAT_DIR_INDEX| \
- FSA_EXT2_FEATURE_COMPAT_LAZY_BG| \
- FSA_EXT4_FEATURE_COMPAT_SPARSE_SUPER2)
+#define FSA_FEATURE_COMPAT_SUPP (u64)(FSA_EXT2_FEATURE_COMPAT_DIR_PREALLOC|\
+ FSA_EXT2_FEATURE_COMPAT_IMAGIC_INODES|\
+ FSA_EXT3_FEATURE_COMPAT_HAS_JOURNAL|\
+ FSA_EXT2_FEATURE_COMPAT_EXT_ATTR|\
+ FSA_EXT2_FEATURE_COMPAT_RESIZE_INODE|\
+ FSA_EXT2_FEATURE_COMPAT_DIR_INDEX|\
+ FSA_EXT2_FEATURE_COMPAT_LAZY_BG|\
+ FSA_EXT4_FEATURE_COMPAT_SPARSE_SUPER2|\
+ FSA_EXT4_FEATURE_COMPAT_FAST_COMMIT)
#define FSA_FEATURE_RO_COMPAT_SUPP (u64)(FSA_EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\
FSA_EXT2_FEATURE_RO_COMPAT_LARGE_FILE|\
FSA_EXT2_FEATURE_RO_COMPAT_BTREE_DIR|\
@@ -132,8 +136,13 @@
FSA_EXT4_FEATURE_INCOMPAT_LARGEDIR|\
FSA_EXT4_FEATURE_INCOMPAT_INLINEDATA)
-// FSA_FEATURE_INCOMPAT_SUPP does not include FSA_EXT4_FEATURE_INCOMPAT_ENCRYPT
-// as it would require special handling to mount an encrypted filesystem
+// FSA_FEATURE_INCOMPAT_SUPP does not include:
+// - FSA_EXT4_FEATURE_INCOMPAT_ENCRYPT as it would require special handling to mount an encrypted filesystem
+// - FSA_EXT4_FEATURE_INCOMPAT_CASEFOLD as it would require special handling to recreate the filesystem with
+// proper "encoding" and "encoding_flags" mke2fs options
+//
+// FSA_FEATURE_COMPAT_SUPP does not include:
+// - FSA_EXT4_FEATURE_COMPAT_STABLE_INODES because it is used mainly with encryption
// old e2fsprogs compatibility glue
#ifndef EXT2_FLAG_SOFTSUPP_FEATURES
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_jfs.c
^
|
@@ -52,13 +52,14 @@
// ---- set the advanced filesystem settings from the dico
memset(options, 0, sizeof(options));
- strlcatf(options, sizeof(options), " %s ", fsoptions);
-
if (strlen(mkfslabel) > 0)
strlcatf(options, sizeof(options), " -L '%s' ", mkfslabel);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0)
strlcatf(options, sizeof(options), " -L '%s' ", buffer);
+ // ---- mkfsopt from command line
+ strlcatf(options, sizeof(options), " %s ", fsoptions);
+
if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "jfs_mkfs -q %s %s", options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed\n", command);
return -1;
@@ -73,7 +74,7 @@
if (options[0])
{
- if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "jfs_tune %s %s", partition, options)!=0 || exitst!=0)
+ if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "jfs_tune %s %s", options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed\n", command);
return -1;
}
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_ntfs.c
^
|
@@ -53,8 +53,6 @@
// ---- set the advanced filesystem settings from the dico
memset(options, 0, sizeof(options));
- strlcatf(options, sizeof(options), " %s ", fsoptions);
-
if (strlen(mkfslabel) > 0)
strlcatf(options, sizeof(options), " --label '%s' ", mkfslabel);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0)
@@ -65,8 +63,11 @@
if (dico_get_u32(d, 0, FSYSHEADKEY_NTFSCLUSTERSIZE, &temp32)==0)
strlcatf(options, sizeof(options), " -c %ld ", (long)temp32);
-
- if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.ntfs -f %s %s", partition, options)!=0 || exitst!=0)
+
+ // ---- mkfsopt from command line
+ strlcatf(options, sizeof(options), " %s ", fsoptions);
+
+ if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.ntfs -f %s %s", options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed\n", command);
return -1;
}
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_reiser4.c
^
|
@@ -53,8 +53,6 @@
// ---- set the advanced filesystem settings from the dico
memset(options, 0, sizeof(options));
- strlcatf(options, sizeof(options), " %s ", fsoptions);
-
if (strlen(mkfslabel) > 0)
strlcatf(options, sizeof(options), " -L '%.16s' ", mkfslabel);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0)
@@ -67,8 +65,11 @@
strlcatf(options, sizeof(options), " -U %s ", mkfsuuid);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 && strlen(buffer)==36)
strlcatf(options, sizeof(options), " -U %s ", buffer);
-
- if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.reiser4 -y %s %s", partition, options)!=0 || exitst!=0)
+
+ // ---- mkfsopt from command line
+ strlcatf(options, sizeof(options), " %s ", fsoptions);
+
+ if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.reiser4 -y %s %s", options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed\n", command);
return -1;
}
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_reiserfs.c
^
|
@@ -52,8 +52,6 @@
// ---- set the advanced filesystem settings from the dico
memset(options, 0, sizeof(options));
- strlcatf(options, sizeof(options), " %s ", fsoptions);
-
if (strlen(mkfslabel) > 0)
strlcatf(options, sizeof(options), " -l '%.16s' ", mkfslabel);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0)
@@ -66,8 +64,11 @@
strlcatf(options, sizeof(options), " -u %s ", mkfsuuid);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 && strlen(buffer)==36)
strlcatf(options, sizeof(options), " -u %s ", buffer);
-
- if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkreiserfs -f %s %s", partition, options)!=0 || exitst!=0)
+
+ // ---- mkfsopt from command line
+ strlcatf(options, sizeof(options), " %s ", fsoptions);
+
+ if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkreiserfs -f %s %s", options, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed\n", command);
return -1;
}
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_vfat.c
^
|
@@ -48,7 +48,7 @@
// ---- check that mkfs.vfat is installed
if (exec_command(command, sizeof(command), NULL, stdoutbuf, sizeof(stdoutbuf), NULL, 0, "mkfs.vfat --help")!=0)
- { errprintf("mkfs.vfat not found. please install mkfs.vfat on your system or check the PATH.\n");
+ { errprintf("mkfs.vfat not found. please install dosfstools on your system or check the PATH.\n");
return -1;
}
@@ -68,6 +68,9 @@
if (dico_get_u32(d, 0, FSYSHEADKEY_FSVFATSERIAL, &temp32)==0)
strlcatf(mkfsopts, sizeof(mkfsopts), " -i '%08X' ", temp32);
+ // ---- mkfsopt from command line
+ strlcatf(mkfsopts, sizeof(mkfsopts), " %s ", fsoptions);
+
// ---- create the new filesystem using mkfs.vfat
if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.vfat %s %s", mkfsopts, partition)!=0 || exitst!=0)
{ errprintf("command [%s] failed\n", command);
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_xfs.c
^
|
@@ -34,6 +34,9 @@
#include "strlist.h"
#include "error.h"
+// POSIX Extended Regular Expression to match RHEL 7 kernel releases
+#define RHEL7_KERNEL_ERE "[[:digit:]]+\\.el7(uek)?\\."
+
int xfs_check_compatibility(u64 compat, u64 ro_compat, u64 incompat, u64 log_incompat)
{
int errors=0;
@@ -103,8 +106,6 @@
memset(xadmopts, 0, sizeof(xadmopts));
memset(uuid, 0, sizeof(uuid));
- strlcatf(mkfsopts, sizeof(mkfsopts), " %s ", fsoptions);
-
if (strlen(mkfslabel) > 0)
strlcatf(mkfsopts, sizeof(mkfsopts), " -L '%.12s' ", mkfslabel);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0)
@@ -123,39 +124,34 @@
if (xfs_check_compatibility(sb_features_compat, sb_features_ro_compat, sb_features_incompat, sb_features_log_incompat)!=0)
return -1;
- // Preserve version 4 of XFS if the original filesystem was an XFSv4 or if
- // it was saved with fsarchiver <= 0.6.19 which does not store the XFS
- // version in the metadata: make an XFSv4 if unsure for better compatibility,
- // as upgrading later is easier than downgrading
+ // Preserve XFS V4 if the original filesystem was V4 or if it was saved with
+ // fsarchiver <= 0.6.19 which does not store the version in the metadata:
+ // create XFS V4 if unsure for better compatibility
if ((dico_get_u64(d, 0, FSYSHEADKEY_FSXFSVERSION, &temp64)!=0) || (temp64==XFS_SB_VERSION_4))
xfsver = XFS_SB_VERSION_4;
else
xfsver = XFS_SB_VERSION_5;
- // Unfortunately it is impossible to preserve the UUID (stamped on every
- // metadata block) of an XFSv5 filesystem with mkfs.xfs < 4.3.0.
- // Restoring with a new random UUID would work but could prevent the system
- // from booting if this is a boot/root filesystem because grub/fstab often
- // use the UUID to identify it. Hence it is much safer to restore it as an
- // XFSv4 and it also provides a better compatibility with older kernels.
- // Hence this is the safest option.
+ // Unfortunately it is impossible to preserve XFS V5 UUID (stamped on every metadata
+ // block) with mkfs.xfs < 4.3.0. Restoring with a new random UUID could prevent the
+ // system from booting if this is a boot/root filesystem because grub/fstab often
+ // use UUID to identify it. Hence it is much safer restore as XFS V4 in this case.
// More details: https://github.com/fdupoux/fsarchiver/issues/4
if ((xfsver==XFS_SB_VERSION_5) && (xfstoolsver < PROGVER(4,3,0)))
{
xfsver = XFS_SB_VERSION_4; // Do not preserve the XFS version
msgprintf(MSG_FORCE,
- "It is impossible to restore this filesystem as an XFSv5 and preserve its UUID\n"
- "with mkfs.xfs < 4.3.0. This filesystem will be restored as an XFSv4 instead\n"
+ "It is impossible to restore this filesystem as XFS V5 and preserve its UUID\n"
+ "with mkfs.xfs < 4.3.0. This filesystem will be restored as XFS V4 instead\n"
"as this is a much safer option (preserving the UUID may be required on\n"
"boot/root filesystems for the operating system to be able to start). If you\n"
- "really want to have an XFSv5 filesystem, please upgrade xfsprogs to version\n"
- "4.3.0 or more recent and rerun this operation to get an XFSv5 with the same\n"
- "UUID as original filesystem\n");
+ "really need XFS V5, please upgrade xfsprogs to version 4.3.0 or more recent\n"
+ "and rerun this operation\n");
}
// Determine if the "crc" mkfs option should be enabled (checksum)
- // - checksum must be disabled if we want to recreate an XFSv4 filesystem
- // - checksum must be enabled if we want to recreate an XFSv5 filesystem
+ // - checksum must be disabled if we want to recreate XFS V4 filesystem
+ // - checksum must be enabled if we want to recreate XFS V5 filesystem
if (xfstoolsver >= PROGVER(3,2,0)) // only use "crc" option when it is supported by mkfs
{
optval = (xfsver==XFS_SB_VERSION_5);
@@ -164,9 +160,9 @@
// Determine if the "finobt" mkfs option should be enabled (free inode btree)
// - starting with linux-3.16 XFS has added a btree that tracks free inodes
- // - this feature relies on the new v5 on-disk format but it is optional
- // - this feature is enabled by default when using xfsprogs 3.2.3 or later
- // - this feature will be enabled if the original filesystem was XFSv5 and had it
+ // - this feature relies on the V5 on-disk format but it is optional
+ // - this feature is enabled by default when using xfsprogs-3.2.3 or later
+ // - this feature will be enabled if the original filesystem was XFS V5 and had it
if (xfstoolsver >= PROGVER(3,2,1)) // only use "finobt" option when it is supported by mkfs
{
optval = ((xfsver==XFS_SB_VERSION_5) && (sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_FINOBT));
@@ -174,10 +170,10 @@
}
// Determine if the "rmapbt" mkfs option should be enabled (reverse mapping btree)
- // - starting with linux-4.8 XFS has added a btree that maps filesystem blocks
- // to their owner
- // - this feature relies on the new v5 on-disk format but it is optional
- // - this feature will be enabled if the original filesystem was XFSv5 and had it
+ // - starting with linux-4.8 XFS has added a btree that maps filesystem blocks to
+ // their owner
+ // - this feature relies on the V5 on-disk format but it is optional
+ // - this feature will be enabled if the original filesystem was XFS V5 and had it
if (xfstoolsver >= PROGVER(4,8,0)) // only use "rmapbt" option when it is supported by mkfs
{
optval = ((xfsver==XFS_SB_VERSION_5) && (sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_RMAPBT));
@@ -186,19 +182,44 @@
// Determine if the "reflink" mkfs option should be enabled
// - starting with linux-4.9 XFS has added support for reflinked files
- // - this feature relies on the new v5 on-disk format but it is optional
- // - this feature will be enabled if the original filesystem was XFSv5 and had it
+ // - this feature relies on the V5 on-disk format but it is optional
+ // - this feature is enabled by default when using xfsprogs-5.1.0 or later
+ // - this feature will be enabled if the original filesystem was XFS V5 and had it
if (xfstoolsver >= PROGVER(4,9,0)) // only use "reflink" option when it is supported by mkfs
{
optval = ((xfsver==XFS_SB_VERSION_5) && (sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_REFLINK));
strlcatf(mkfsopts, sizeof(mkfsopts), " -m reflink=%d ", (int)optval);
}
- // Attempt to preserve UUID of the filesystem
- // - the "-m uuid=<UUID>" option in mkfs.xfs was added in mkfs.xfs 4.3.0 and is the best way to set UUIDs
- // - the UUID of XFSv4 can be successfully set using either xfs_admin or mkfs.xfs >= 4.3.0
- // - it is impossible to set both types of UUIDs of an XFSv5 filesystem using xfsprogs < 4.3.0
- // for this reason the XFS version is forced to v4 if xfsprogs version < 4.3.0
+ // Determine if the "inobtcount" mkfs option should be enabled (inobt block counts)
+ // - starting with linux-5.10 XFS has added block usage counters for inode btrees
+ // to reduce mount times
+ // - this optional feature relies on the V5 on-disk format and on the "finobt"
+ // (free inode btree) mkfs option being enabled
+ // - this feature will be enabled if the original filesystem was XFS V5 and had it
+ if (xfstoolsver >= PROGVER(5,10,0)) // only use "inobtcount" option when it is supported by mkfs
+ {
+ optval = ((xfsver==XFS_SB_VERSION_5) && (sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_INOBTCNT));
+ strlcatf(mkfsopts, sizeof(mkfsopts), " -m inobtcount=%d ", (int)optval);
+ }
+
+ // Determine if the "bigtime" mkfs option should be enabled (large timestamps)
+ // - starting with linux-5.10 XFS has added support for larger inode timestamps, beyond january 2038
+ // - this feature relies on the V5 on-disk format but it is optional
+ // - this feature will be enabled if the original filesystem was XFS V5 and had it
+ if (xfstoolsver >= PROGVER(5,10,0)) // only use "bigtime" option when it is supported by mkfs
+ {
+ optval = ((xfsver==XFS_SB_VERSION_5) && (sb_features_incompat & XFS_SB_FEAT_INCOMPAT_BIGTIME));
+ strlcatf(mkfsopts, sizeof(mkfsopts), " -m bigtime=%d ", (int)optval);
+ }
+
+ // Attempt to preserve filesystem UUID
+ // - mkfs.xfs' "-m uuid=" option was added in version 4.3.0 and is the best way to set UUID
+ // - XFS V4 UUID can be successfully set using either xfs_admin or mkfs.xfs >= 4.3.0
+ // - XFS V5 UUID, on the other hand, can't be set by xfs_admin without enabling a superblock
+ // incompat flag which bumps minimal kernel version to linux-4.3 and sets two different UUIDs
+ // in the filesystem: user-visible and metadata. For this reason XFS version is forced to V4
+ // if xfsprogs < 4.3.0
if (strlen(mkfsuuid) > 0)
snprintf(uuid, sizeof(uuid), "%s", mkfsuuid);
else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0)
@@ -213,37 +234,39 @@
// Determine if the "ftype" mkfs option should be enabled (filetype in dirent)
// - this feature allows the inode type to be stored in the directory structure
- // - mkfs.xfs 4.2.0 enabled ftype by default (supported since mkfs.xfs 3.2.0) for XFSv4 volumes
- // - when CRCs are enabled via -m crc=1, the ftype functionality is always enabled
- // - ftype is madatory in XFSv5 volumes but it is optional for XFSv4 volumes
+ // - this feature is madatory on XFS V5 (always enabled) but it is optional on XFS V4
+ // - mkfs.xfs 4.2.0 enabled it by default on XFS V4 filesystems
// - the "ftype" option must be specified after the "crc" option in mkfs.xfs < 4.2.0:
- // https://git.kernel.org/cgit/fs/xfs/xfsprogs-dev.git/commit/?id=b990de8ba4e2df2bc76a140799d3ddb4a0eac4ce
- // - do not set ftype=1 with crc=1 as mkfs.xfs may fail when both options are enabled (at least with xfsprogs-3.2.2)
- // - XFSv4 with ftype=1 is supported since linux-3.13. We purposely always
- // disable ftype for V4 volumes to keep them compatible with older kernels
+ // https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=b990de8ba4e2df2bc76a140799d3ddb4a0eac4ce
+ // - do not set ftype=1 with crc=1 as mkfs.xfs may fail (at least with xfsprogs-3.2.2)
+ // - XFS V4 with ftype=1 is supported since linux-3.13. We purposely always disable it
+ // on V4 filesystems to keep them compatible with older kernels
if (xfstoolsver >= PROGVER(3,2,0)) // only use "ftype" option when it is supported by mkfs
{
- // ftype is already set to 1 when it is XFSv5
+ // ftype is already set to 1 when it is XFS V5
if (xfsver==XFS_SB_VERSION_4)
strlcatf(mkfsopts, sizeof(mkfsopts), " -n ftype=0 ");
}
// Determine if the "sparse" mkfs option should be enabled (sparse inode allocation)
// - starting with linux-4.2 XFS can allocate discontinuous inode chunks
- // - this feature relies on the new v5 on-disk format but it is optional
- // - this feature is enabled by default when using xfsprogs 4.16.0 or later
- // - this feature will be enabled if the original filesystem was XFSv5 and had it
- // - this feature is supported since mkfs.xfs 4.2.0, but unfortunately
- // mkfs.xfs 4.5.0 in RHEL 7.3 carries a custom patch removing the option,
- // hence require mkfs.xfs 4.7.0, next version after 4.5.0
- if (xfstoolsver >= PROGVER(4,7,0)) // only use "sparse" option when it is supported by mkfs
+ // - this feature relies on the V5 on-disk format but it is optional
+ // - this feature is enabled by default when using xfsprogs-4.16.0 or later
+ // - this feature will be enabled if the original filesystem was XFS V5 and had it
+ // - this feature is supported since mkfs.xfs 4.2.0
+ // - mkfs.xfs 4.5.0 in RHEL 7.3 carries a custom patch removing the option
+ if (xfstoolsver >= PROGVER(4,2,0) &&
+ !match_uname_r(RHEL7_KERNEL_ERE)) // only use "sparse" option when it is supported by mkfs
{
optval = ((xfsver==XFS_SB_VERSION_5) && (sb_features_incompat & XFS_SB_FEAT_INCOMPAT_SPINODES));
strlcatf(mkfsopts, sizeof(mkfsopts), " -i sparse=%d ", (int)optval);
}
+ // ---- mkfsopt from command line
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fs_xfs.h
^
|
@@ -185,18 +185,22 @@
#define XFS_SB_FEAT_RO_COMPAT_FINOBT (1 << 0) /* free inode btree */
#define XFS_SB_FEAT_RO_COMPAT_RMAPBT (1 << 1) /* reverse map btree */
#define XFS_SB_FEAT_RO_COMPAT_REFLINK (1 << 2) /* reflinked files */
+#define XFS_SB_FEAT_RO_COMPAT_INOBTCNT (1 << 3) /* inobt block counts */
#define XFS_SB_FEAT_INCOMPAT_FTYPE (1 << 0) /* filetype in dirent */
#define XFS_SB_FEAT_INCOMPAT_SPINODES (1 << 1) /* sparse inode chunks */
#define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */
+#define XFS_SB_FEAT_INCOMPAT_BIGTIME (1 << 3) /* large timestamps */
// features supported by the current fsarchiver version
#define FSA_XFS_FEATURE_COMPAT_SUPP (u64)(0)
#define FSA_XFS_FEATURE_RO_COMPAT_SUPP (u64)(XFS_SB_FEAT_RO_COMPAT_FINOBT|\
XFS_SB_FEAT_RO_COMPAT_RMAPBT|\
- XFS_SB_FEAT_RO_COMPAT_REFLINK)
+ XFS_SB_FEAT_RO_COMPAT_REFLINK|\
+ XFS_SB_FEAT_RO_COMPAT_INOBTCNT)
#define FSA_XFS_FEATURE_INCOMPAT_SUPP (u64)(XFS_SB_FEAT_INCOMPAT_FTYPE|\
XFS_SB_FEAT_INCOMPAT_SPINODES|\
- XFS_SB_FEAT_INCOMPAT_META_UUID)
+ XFS_SB_FEAT_INCOMPAT_META_UUID|\
+ XFS_SB_FEAT_INCOMPAT_BIGTIME)
#define FSA_XFS_FEATURE_LOG_INCOMPAT_SUPP (u64)(0)
#endif // __FS_XFS_H__
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fsarchiver.c
^
|
@@ -196,14 +196,12 @@
g_options.encryptpass[0]=0;
// set default compression mode
+ g_options.compressalgo=FSA_DEF_COMPRESS_ALGO;
+ g_options.compresslevel=FSA_DEF_COMPRESS_LEVEL;
#ifdef OPTION_ZSTD_SUPPORT
- g_options.fsacomplevel=FSA_DEF_ZSTD_LEVEL;
- g_options.compressalgo=COMPRESS_ZSTD;
- g_options.compresslevel=FSA_DEF_ZSTD_LEVEL;
+ g_options.fsacomplevel=FSA_DEF_COMPRESS_LEVEL;
#else
- g_options.fsacomplevel=3; // fsa level 3 = "gzip -6"
- g_options.compressalgo=FSA_DEF_COMPRESS_ALGO;
- g_options.compresslevel=FSA_DEF_COMPRESS_LEVEL; // default level for gzip
+ g_options.fsacomplevel=FSA_DEF_FSACOMP_LEVEL;
#endif // OPTION_ZSTD_SUPPORT
while ((c = getopt_long(argc, argv, "oaAvdj:hVs:c:L:e:xz:Z:", long_options, NULL)) != EOF)
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/fsarchiver.h
^
|
@@ -124,9 +124,14 @@
#define FSA_MAX_QUEUESIZE 32
#define FSA_MAX_BLKSIZE 921600
#define FSA_DEF_BLKSIZE 524288
-#define FSA_DEF_COMPRESS_ALGO COMPRESS_GZIP // legacy compression is using gzip by default
-#define FSA_DEF_COMPRESS_LEVEL 6 // legacy compression is with "gzip -6" by default
-#define FSA_DEF_ZSTD_LEVEL 8 // default compression level when zstd is used
+#ifdef OPTION_ZSTD_SUPPORT
+ #define FSA_DEF_COMPRESS_ALGO COMPRESS_ZSTD
+ #define FSA_DEF_COMPRESS_LEVEL 8
+#else
+ #define FSA_DEF_COMPRESS_ALGO COMPRESS_GZIP
+ #define FSA_DEF_COMPRESS_LEVEL 6
+#endif
+#define FSA_DEF_FSACOMP_LEVEL 3 // legacy -z mapping for gzip level 6
#define FSA_MAX_SMALLFILECOUNT 512 // there can be up to FSA_MAX_SMALLFILECOUNT files copied in a single data block
#define FSA_MAX_SMALLFILESIZE 131072 // files smaller than that will be grouped with other small files in a single data block
#define FSA_COST_PER_FILE 16384 // how much it cost to copy an empty file/dir/link: used to eval the progress bar
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/options.c
^
|
@@ -48,12 +48,13 @@
switch (opt)
{
#ifdef OPTION_LZ4_SUPPORT
- case 0: // lz4
- g_options.compressalgo=COMPRESS_LZ4;
- break;
+ case 0: // lz4
+ g_options.compressalgo=COMPRESS_LZ4;
+ break;
#else
- case 0: // lz4
+ case 0: // lz4
errprintf("compression level %d is not available: lz4 has been disabled at compilation time\n", opt);
+ return -1;
#endif // OPTION_LZ4_SUPPORT
#ifdef OPTION_LZO_SUPPORT
case 1: // lzo
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/src/thread_comp.c
^
|
@@ -49,6 +49,11 @@
u64 compsize;
u64 bufsize;
int res;
+#ifdef OPTION_ZSTD_SUPPORT
+ bool zstd=true;
+#else
+ bool zstd=false;
+#endif
bufsize = (blkinfo->blkrealsize) + (blkinfo->blkrealsize / 16) + 64 + 3; // alloc bigger buffer else lzo will crash
if ((bufcomp=malloc(bufsize))==NULL)
@@ -99,14 +104,17 @@
#endif // OPTION_ZSTD_SUPPORT
default:
free(bufcomp);
- msgprintf(2, "invalid compression level: %d\n", (int)compalgo);
+ errprintf("unsupported compression algorithm: %d\n", compalgo);
return -1;
}
// retry if high compression was used and compression failed because of FSAERR_ENOMEM
- if ((res == FSAERR_ENOMEM) && (compalgo > FSA_DEF_COMPRESS_ALGO))
+ // at this point, if zstd is not supported, compalgo == COMPRESS_ZSTD cannot be true
+ if (res == FSAERR_ENOMEM && ((compalgo == COMPRESS_ZSTD && complevel > FSA_DEF_COMPRESS_LEVEL) ||
+ compalgo != FSA_DEF_COMPRESS_ALGO))
{
- errprintf("attempt to compress the current block using an alternative algorithm (\"-z%d\")\n", FSA_DEF_COMPRESS_ALGO);
+ errprintf("attempt to compress the current block using an alternative algorithm (\"%s%d\")\n",
+ zstd ? "-Z" : "-z", zstd ? FSA_DEF_COMPRESS_LEVEL : FSA_DEF_FSACOMP_LEVEL);
compalgo = FSA_DEF_COMPRESS_ALGO;
complevel = FSA_DEF_COMPRESS_LEVEL;
}
@@ -119,7 +127,7 @@
blkinfo->blkdata=bufcomp; // new buffer (with compressed data)
blkinfo->blkcompsize=compsize; // size after compression and before encryption
blkinfo->blkarsize=compsize; // in case there is no encryption to set this
- //errprintf ("COMP_DBG: block successfully compressed using %s\n", compress_algo_int_to_string(compalgo));
+ //errprintf("COMP_DBG: block successfully compressed using algorithm %d level %d\n", compalgo, complevel);
}
else // compressed version is bigger or compression failed: keep the original block
{ memcpy(bufcomp, blkinfo->blkdata, blkinfo->blkrealsize);
@@ -128,7 +136,7 @@
blkinfo->blkcompsize=blkinfo->blkrealsize; // size after compression and before encryption
blkinfo->blkarsize=blkinfo->blkrealsize; // in case there is no encryption to set this
blkinfo->blkcompalgo=COMPRESS_NONE;
- //errprintf ("COMP_DBG: block copied uncompressed, attempted using %s\n", compress_algo_int_to_string(compalgo));
+ //errprintf("COMP_DBG: block copied uncompressed, attempted using algorithm %d level %d\n", compalgo, complevel);
}
u64 cryptsize;
@@ -274,7 +282,7 @@
break;
#endif // OPTION_ZSTD_SUPPORT
default:
- errprintf("unsupported compression algorithm: %ld\n", (long)blkinfo->blkcompalgo);
+ errprintf("unsupported compression algorithm: %d\n", blkinfo->blkcompalgo);
return -1;
}
free(blkinfo->blkdata); // free old buffer (with compressed data)
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/_index.md
^
|
@@ -37,13 +37,13 @@
extended-attributes, ...), as long as the kernel has support for it enabled.
It allows to preserve all the windows file attributes (ACL, standard
attributes, ...). It can be used with LVM snapshots in order to
-[make consistent backups of all filesystems](http://www.system-rescue-cd.org/lvm-guide-en/Making-consistent-backups-with-LVM/)
+[make consistent backups of all filesystems](https://www.system-rescue.org/lvm-guide-en/Making-consistent-backups-with-LVM/)
including the root filesystem.
FSArchiver has been **packaged by most popular Linux distributions** (Fedora,
Debian, Ubuntu, OpenSUSE, ArchLinux, Gentoo) hence it can be installed very
easily from the standard package repositories using the standard yum / apt-get
-/ emerge / pacman commands. It can also be used from SystemRescueCd, as it
+/ emerge / pacman commands. It can also be used from SystemRescue, as it
comes with all run-time dependencies, so that you can restore your system and
data after a problem.
@@ -98,13 +98,10 @@
after the corruption are lost.
## Download
-* You can download either [the sources](https://github.com/fdupoux/fsarchiver/releases/download/0.8.2/fsarchiver-0.8.2.tar.gz)
+* You can download either [the sources](https://github.com/fdupoux/fsarchiver/releases/download/0.8.6/fsarchiver-0.8.6.tar.gz)
or a static binary from the [github releases page](https://github.com/fdupoux/fsarchiver/releases).
-* You can also download [SystemRescueCd](http://www.system-rescue-cd.org/) which is
+* You can also download [SystemRescue](https://www.system-rescue.org/) which is
a livecd that provides a recent FSArchiver and all the file-system tools and
libraries required. So if you want to use FSArchiver to save or restore your
root file-system, the best thing to do is to run FSArchiver from this livecd.
* You can track the changes using the [detailed ChangeLog](/changelog/) page.
-
-## Contact
-You can ask technical questions, and general questions in the [forums](https://forums.fsarchiver.org/).
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/attributes/_index.md
^
|
@@ -78,7 +78,7 @@
filesystem on a system having SELinux enabled as long as it does not block
fsarchiver. But it's recommended to restore filesystems using fsarchiver from
an environment where SELinux is disabled or not supported. You can use
-http://www.sysresccd.org[SystemRescueCd] which does not have SELinux enabled.
+http://www.sysresccd.org[SystemRescue] which does not have SELinux enabled.
The problem with SELinux during a restoration is that it can create labels on
each file that is being restored, even if the original filesystem had no such
labels.
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/changelog/_index.md
^
|
@@ -5,6 +5,11 @@
draft = false
+++
+* **0.8.6 (2021-02-27):**
+ - Add support for EXT4 fast_commit feature (Marcos Mello)
+ - Add support for XFS features inobtcount and bigtime (Marcos Mello)
+ - Fix handling of compression options on the command line (Marcos Mello)
+ - Specify device as the last argument in mkfs calls (Marcos Mello)
* **0.8.5 (2018-07-10):**
* Improved support for extfs filesystems (Contribution from Marcos Mello)
* Fixed build issue with e2fsprogs < 1.41 (Contribution from Marcos Mello)
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/cloning-ntfs/_index.md
^
|
@@ -28,7 +28,7 @@
To clone NTFS partitions, you need ntfs-3g-2009.11.14 or more recent, and a
recent fsarchiver release. It's recommended to use the latest version of these
two programs. The most convenient way to use it is to run a recent fsarchiver
-version from [SystemRescueCd](http://www.system-rescue-cd.org). It's a livecd that
+version from [SystemRescue](https://www.system-rescue.org). It's a livecd that
comes with fsarchiver and all the filesystems tools.
## Current status
@@ -93,7 +93,7 @@
[/dev/sda4 ] [lvm2pv ] [<unknown> ] [ 898.56 GB] [ 8] [ 4]
```
-We can mount this partition from SystemRescueCd using ntfs-3g:
+We can mount this partition from SystemRescue using ntfs-3g:
```
# ntfs-3g /dev/sda1 /mnt/windows
```
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/compression/_index.md
^
|
@@ -132,9 +132,6 @@
be an issue with any recent desktop or server machine if you use compression levels
inferior to -z9.
-You can read the following [
-topic about memory problems](http://forums.fsarchiver.org/viewtopic.php?p=2259).
-
The biggest part of the memory requirement is the compression threads. The more
compression threads you have, the more memory you need. Very high compression
levels (especially -z9) requires a huge amount of memory. If you don't have
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/installation/_index.md
^
|
@@ -6,7 +6,7 @@
+++
## Installation
-You can either download a livecd with FSArchiver on it (eg: any recent SystemRescueCd),
+You can either download a livecd with FSArchiver on it (eg: any recent SystemRescue),
or you can install it on your existing Linux system. If you want to install it, you
have three solutions:
@@ -43,8 +43,8 @@
To compile the sources, you have to run follow these instructions:
#### Download the latest sources
-First, you have to download [fsarchiver-0.8.5.tar.gz]
-(https://github.com/fdupoux/fsarchiver/releases/download/0.8.5/fsarchiver-0.8.5.tar.gz).
+First, you have to download
+[fsarchiver-0.8.6.tar.gz](https://github.com/fdupoux/fsarchiver/releases/download/0.8.6/fsarchiver-0.8.6.tar.gz).
Just save it to a temporary directory.
#### Extract the sources in a temporary directory
@@ -91,7 +91,7 @@
(such as e2fsprogs, reiserfsprogs, xfsprogs, ...) when you want to restore a
file-system. And it should not really be a problem since you often want to
restore a file-system by booting from a livecd such as
-[SystemRescueCd](http://www.system-rescue-cd.org), since you cannot restore your
+[SystemRescue](https://www.system-rescue.org), since you cannot restore your
root file-system when you are using it, so booting from a livecd / usb-stick is
mandatory in that case.
@@ -111,7 +111,7 @@
```
### Installation on Ubuntu (using apt-get)
-Package [information](https://packages.ubuntu.com/bionic/fsarchiver).
+Package [information](https://packages.ubuntu.com/groovy/fsarchiver).
```
sudo apt-get update
sudo apt-get install fsarchiver
@@ -136,47 +136,41 @@
pacman -S fsarchiver
```
-### Installation on RHEL / CentOS / Scientific Linux
+### Installation on RHEL / CentOS 7.x
You should use these RPM packages that have been built for RHEL7 based
distributions, that is the recommended way for most users:
-* [fsarchiver-0.8.5-1.el7.x86_64.rpm](https://github.com/fdupoux/fsarchiver/releases/download/0.8.5/fsarchiver-0.8.5-1.el7.x86_64.rpm)
+* [fsarchiver-0.8.6-1.el7.x86_64.rpm](https://github.com/fdupoux/fsarchiver/releases/download/0.8.6/fsarchiver-0.8.6-1.el7.x86_64.rpm)
NOTE: Installing fsarchiver's rpm requires [EPEL](https://fedoraproject.org/wiki/EPEL) enabled.
Use the following commands to install:
```
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-yum install https://github.com/fdupoux/fsarchiver/releases/download/0.8.5/fsarchiver-0.8.5-1.el7.x86_64.rpm
+yum install https://github.com/fdupoux/fsarchiver/releases/download/0.8.6/fsarchiver-0.8.6-1.el7.x86_64.rpm
```
If you want to compile fsarchiver yourself, use the following instructions:
```
-yum install zlib-devel bzip2-devel lzo-devel lz4-devel xz-devel e2fsprogs-devel libgcrypt-devel libattr-devel libblkid-devel
-tar xfz fsarchiver-0.8.5.tar.gz
-cd fsarchiver-0.8.5
+yum install zlib-devel bzip2-devel lzo-devel lz4-devel xz-devel libzstd-devel e2fsprogs-devel libgcrypt-devel libattr-devel libblkid-devel
+tar xfz fsarchiver-0.8.6.tar.gz
+cd fsarchiver-0.8.6
./configure --prefix=/usr && make && make install
```
### Installation on Gentoo
Gentoo implements support for packages using ebuild files. There is an
-[official ebuild for fsarchiver]
-(http://packages.gentoo.org/packages/app-backup/fsarchiver), so you can directly
-install it using the **emerge** command as long as your portage tree is recent.
-You may also have to change the keywords to make the installation possible:
-
-Add app-backup/fsarchiver to your /etc/portage/package.keywords if required:
-```
-echo "app-backup/fsarchiver ~*" >> /etc/portage/package.keywords
-```
-
-Change USE flags if you want non-default compilation options:
-```
-echo "app-backup/fsarchiver lzma lzo" >> /etc/portage/package.use
-```
+[official ebuild for fsarchiver](http://packages.gentoo.org/packages/app-backup/fsarchiver),
+so you can directly install it using the **emerge** command as long as your
+portage tree is recent. You may also have to change the keywords to make the
+installation possible:
Run the installation command:
```
emerge app-backup/fsarchiver
```
+
+### Installation on Guix
+
+There is an [official fsarchiver package for Guix](https://guix.gnu.org/en/packages/F/).
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/internal-multithreading/_index.md
^
|
@@ -6,15 +6,13 @@
+++
## About multi-threading
-Today all the new processors are dual-core or quad-core. But all the
+Today all the new processors are dual-core or quad-core. But all the
standard compression tools are single threaded. It means that when
you use "tar cfz" for "tar cfj", to compress a tarball using gzip
or bzip2, you just use one cpu, so just 50% of 25% of the power you
have. FSArchiver is multi-threaded if you use option "-j" to create
several compression jobs, so that it can use all the power of your
-processors to compress faster. For instance, compressing on an intel
-Q6600 quad-core with bzip2 is really fast, and with lzma it's not too
-slow.
+processors to compress faster.
## Implementation of the multi-threading
FSArchiver is using three kinds of threads even if you don't use the
@@ -37,9 +35,9 @@
searching for the first block to be processed in the queue, they
process it, and update the block in the queue. For instance if the
queue is able to store 10 data blocks at a given time, it means that
-a quad-core processor will have enough blocks to feed each of its
-cores, and then to use all the power of this processor. The size of
-the queue is defined by FSA_MAX_QUEUESIZE. It says how many data
+a quad-core processor will have enough blocks to feed each of its
+cores, and then to use all the power of this processor. The size of
+the queue is defined by FSA_MAX_QUEUESIZE. It says how many data
blocks can be stored in the queue at a given time. When this limit
is reached, the thread which fills the queue will have to wait.
@@ -58,7 +56,7 @@
## Queue and synchronization
The queue is what links all the threads together. It's a critical
section of the code so it's very important that it contains no bug.
-The consistency of this queue is guaranteed with a mutex (to make
+The consistency of this queue is guaranteed with a mutex (to make
sure that two threads can't change the same thing at the same time).
It's very important that each function that locks this mutex unlocks
it before it exits, else there will be a dead-lock. It's also useful
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/live-backup/_index.md
^
|
@@ -12,7 +12,7 @@
**live backup** or *hot backup*. All you need is an fsarchiver binary, an another
filesystem where to save the archive. It can be on another partition on the
hard-disk, or a network file-system such as Samba of NFS.
-
+
## Backup with a snapshot
If the partitions you want to save are LVM (Logical volume Manager)
Logical-Volumes, and it you have free extents in the Volume-Group, then you can
@@ -54,9 +54,9 @@
following error message, and stops:
```
# fsarchiver savefs /mnt/archives/gentoo-backup-20090328-01.fsa /dev/sda2 -v
-create.c#0642,filesystem_mount_partition(): partition [/dev/sda2] is mounted read/write.
- please mount it read-only and then try again. you can do "mount -o remount,ro /dev/sda2".
- you can also run fsarchiver with option '-A' if you know what you are doing.
+create.c#0642,filesystem_mount_partition(): partition [/dev/sda2] is mounted read/write.
+ please mount it read-only and then try again. you can do "mount -o remount,ro /dev/sda2".
+ you can also run fsarchiver with option '-A' if you know what you are doing.
removing /mnt/archives/gentoo-backup-20090328-01.fsa
```
When a filesystem is writeable during the backup, it means changes can be done
@@ -66,7 +66,7 @@
directory from the website. In that case the backup could contains a reference
in the database but not the referred file because these files have been backed
up already. So you have to know whether or not your system may have such
-inconsistencies.
+inconsistencies.
If there is no risk of inconsistency, then you can use fsarchiver with option
**-A** to continue the backup of a filesystem which is mounted in read-write mode.
@@ -75,11 +75,10 @@
If you have a problem on your filesystems, you may want to restore the
live-backup you made. You cannot restore a filesystem which is mounted, so
it's necessary to restore from a Linux-Rescue system. We recommend that you
-use [SystemRescueCd](http://www.system-rescue-cd.org) for multiple reasons:
+use [SystemRescue](https://www.system-rescue.org) for multiple reasons:
* it comes with a recent version of fsarchiver
-* you can boot it from the cdrom, an [usb stick]
-(http://www.system-rescue-cd.org/Installing-SystemRescueCd-on-a-USB-stick/),
-or [from the network](http://www.system-rescue-cd.org/manual/PXE_network_booting/).
-* it contains [all the filesystem tools](http://www.system-rescue-cd.org/System-tools)
+* you can boot it from the cdrom, an [usb stick](https://www.system-rescue.org/Installing-SystemRescue-on-a-USB-memory-stick/),
+or [from the network](https://www.system-rescue.org/manual/PXE_network_booting/).
+* it contains [all the filesystem tools](https://www.system-rescue.org/System-tools/)
that fsarchiver may need
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/partimage/_index.md
^
|
@@ -8,19 +8,19 @@
Here is a table that summarizes the differences between partimage and
fsarchiver. This page shows the pros and cons of each solution.
-| **Description** | **fsarchiver** | **partimage** |
-|:------------------------------------------------------------------------------------|:-------------------------:|:--------------------:|
-| Ability to save/restore standard linux filesystems (ext2, ext3, reiserfs, xfs, jfs) | Yes | Yes |
-| Ability to save/restore new generation linux filesystems (ext4, reiser4, btrfs) | Yes | No |
-| Ability to save/restore windows ntfs filesystems | Yes (experimental) | Yes (experimental) |
-| Requires kernel filesystem or fuse support for a filesystem to be supposed | Yes | No |
-| Ability to restore the filesystem to a partition which is smaller than the original | Yes | Requires resizefs |
-| Ability to restore the filesystem to a partition which is bigger than the original | Yes | No |
-| Requires filesystem tools such as mkfs to be installed to save the filesystem | No | No |
-| Requires filesystem tools such as mkfs to be installed to restore the filesystem | Yes | No |
-| Checksumming of the data and ability to restore corrupt archives | Yes | No |
-| Compression algorithms which are supported | lzo, lz4, gzip, bzip2, xz | gzip, bzip2 |
-| Multi-threaded compression to make it faster on computers with multiple cores/cpu | Yes | No |
-| Ability to encrypt the data with a password | Yes | No |
-| Information taken into account to save the filesystem | Files | Blocks |
-| User interface that comes with the program by default | Text | Semi-graphical |
+| **Description** | **fsarchiver** | **partimage** |
+|:------------------------------------------------------------------------------------|:-------------------------------:|:--------------------:|
+| Ability to save/restore standard linux filesystems (ext2, ext3, reiserfs, xfs, jfs) | Yes | Yes |
+| Ability to save/restore new generation linux filesystems (ext4, reiser4, btrfs) | Yes | No |
+| Ability to save/restore windows ntfs filesystems | Yes (experimental) | Yes (experimental) |
+| Requires kernel filesystem or fuse support for a filesystem to be supposed | Yes | No |
+| Ability to restore the filesystem to a partition which is smaller than the original | Yes | Requires resizefs |
+| Ability to restore the filesystem to a partition which is bigger than the original | Yes | No |
+| Requires filesystem tools such as mkfs to be installed to save the filesystem | No | No |
+| Requires filesystem tools such as mkfs to be installed to restore the filesystem | Yes | No |
+| Checksumming of the data and ability to restore corrupt archives | Yes | No |
+| Compression algorithms which are supported | lzo, lz4, gzip, bzip2, xz, zstd | gzip, bzip2 |
+| Multi-threaded compression to make it faster on computers with multiple cores/cpu | Yes | No |
+| Ability to encrypt the data with a password | Yes | No |
+| Information taken into account to save the filesystem | Files | Blocks |
+| User interface that comes with the program by default | Text | Semi-graphical |
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/quickstart/_index.md
^
|
@@ -162,7 +162,7 @@
For these reasons, it's a good idea to run FSArchiver from an environment with
all the system tools installed. The best environment is
-[SystemRescueCd](http://www.system-rescue-cd.org), since it comes
+[SystemRescue](https://www.system-rescue.org), since it comes
with all the linux file-system tools and a very recent FSArchiver version.
It's also important to make sure that SELinux is not enabled in the kernel running
@@ -176,7 +176,7 @@
FSArchiver would not preserve these attributes and the system would not work when you
restore your root filesystem, or you would have to ask the SELinux to relabel it.
The SELinux support is disabled by default if you use FSArchiver from
-SystemRescueCd-1.1.3 or newer, so your SELinux labels will be preserved if you use
+SystemRescue, so your SELinux labels will be preserved if you use
FSArchiver from that environment.
## Detection of the filesystems
|
[-]
[+]
|
Changed |
_service:tar_git:fsarchiver-0.8.6.tar.gz/fsarchiver/website/content/tests/_index.md
^
|
@@ -17,7 +17,7 @@
Here is the **detailed test procedure** that we follow:
* install a Linux system with selinux enabled (when available) on /dev/sda1 (/boot) and /dev/sda2 (root filesystem)
-* reboot the machine on a livecd with fsarchiver (the latest SystemRescueCd with FSArchiver on it)
+* reboot the machine on a livecd with fsarchiver (the latest SystemRescue with FSArchiver on it)
* mount /dev/sda3 on /mnt/backup to store the FSArchiver archive.
* run **fsarchiver -o savefs /mnt/backup/backup-xxxx.fsa /dev/sda2**
* erase the root filesystem: **dd if=/dev/zero of=/dev/sda2 bs=1024k**
|