#StackBounty: #backup #disk-image #ext4 #rescue-disk #sparseimage How to create sparse, bootable Linux backup images?

Bounty: 50

I’ve set up a new Linux workstation and would like to create a backup image in order to save time in case something breaks. This is the situation:

  • Workstation: 512 GB SSD, 12 GB used, ext4 file system, may contain bad blocks
  • Backup drive: 64 GB USB flash drive

The backup image should be bootable for the added flexibility of being able to carry around and start the workstation system from any compatible host computer. All programs, configurations, network settings (proxies, VPNs) etc. should be preserved.

As I understand, a sparse, file-based image will be necessary, since the backup drive (and possibly also the replacement drive) is smaller than the source drive.

What is a good way to do this? AFAIK, dd just copies bit by bit and ddrescue can only sparsify blocks of zeros into metadata, but not unused space filled with random data. Some disk cleanup tools offer to fill unused space with zeros, but this usually takes many hours and I’m not sure if this is good practice for collapsing data.

I need a reliable, free, and easy solution as I don’t have any expertise on file systems, partition structures, boot sectors etc.


Get this bounty!!!

#StackBounty: #linux #backup #disk-image #rescue-disk #sparseimage How to create sparse, bootable Linux backup images?

Bounty: 50

I’ve set up a new workstation with a freshly installed and furnished Linux Mint Debian Edition 4 system and would like to create a backup image in order to save time in case something breaks. This is the situation:

  • Workstation: 512 GB SSD with 12 GB of data, may contain bad blocks
  • Backup drive: 64 GB USB flash drive

If possible, the backup image should be bootable, just for the added flexibility of being able to start the workstation system from any compatible host computer. Its main purpose, however, is a rescue backup for safe storage only and not regular use.

As I understand, such a backup requires a sparse image based on files, since both the backup drive and the replacement workstation drive may have a different – possibly much smaller – size than the source.

What is a good way to do this? AFAIK, dd just copies bit by bit and ddrescue can only "sparsify" blocks of zeros into metadata, but not unused space filled with random data. Some disk cleanup tools offer to fill unused space with zeros, but this usually takes many hours and I’m not sure if this is good practice for collapsing data.

I need a reliable, but easy solution as I don’t have any expertise on file systems, partition structures, boot sectors etc.


Get this bounty!!!

#StackBounty: #backup #iscsi #synology-diskstation How to connect to iscsi target with iscsiadm from Synology through SSH

Bounty: 150

Since we want to back up our Synology NAS internally with a rotation system, I’m trying to connect to an iscsi target on my tandberg/overland Quickstation 4 from my Synology NAS (SA3400). I’ve tried using iscsiadm from the command line through SSH since i cannot find a GUI solution for this, but haven’t had any luck so far.

When I try to discover using the following command:

sudo iscsiadm -m discovery --type sendtargets --portal 192.168.1.1

I get the following output:

iscsiadm: can not connect to iSCSI daemon (111)!
iscsiadm: can not connect to iSCSI daemon (111)!
iscsiadm: Cannot perform discovery. Initiatorname required.
iscsiadm: Discovery process to 192.168.1.1:3260 failed to create a discovery session.
iscsiadm: Could not perform SendTargets discovery.

Update:

I got feedback from synology support; they apologize any inconvenience caused and doesn’t want to provide any documentation for their system other than what they have on their website. No help from them.

I managed to discover the target (I had to run iscsid as sudo su), but I’m stuck because I cannot find a way to get the iscsi_tcp driver to start.
depmod -a doesn’t work, and modprobe iscsi_tcp doesn’t do anything as far as I can see, lsmod | grep iscsi returns iscsi_target_mod and iscsi_core_mod only.

Basically, modprobe seems to be totally stripped of functionality on the Synology.

When I try to load the modules with insmod:
insmod /usr/lib/modules/iscsi_tcp.ko I get the following error:
insmod: ERROR: could not insert module /usr/lib/modules/libiscsi_tcp.ko: Unknown symbol in module

When I try to log in to the target, I get the following:

Logging in to [iface: default, target: iqn.SomeTargetName, portal: 192.168.1.1,3260]
iscsiadm: Could not login to [iface: default, target: iqn.SomeTargetName, portal: 192.168.1.1,3260]:
iscsiadm: initiator reported error (12 - iSCSI driver not found. Please make sure it is loaded, and retry the operation)

I’m soon giving up on trying, it is a shame that Synology is unwilling to support such a basic need as this.

So my question now is:

Is there a solution out there, where I can connect to a target from Synology (most likely through the CLI) and make it persistently logged in and mounted in DSM, even after updates and restarts?

Note: the IP is obfuscated.


Get this bounty!!!

#StackBounty: #backup Error when w!riting a file "Can't delete backup file"

Bounty: 50

I’m having a problem when writing to a file created by another user. When I try to do :w I get the error message E506: Can't write to backup file (add ! to override) and when I do :w! the file get’s written but I still see this:

/share/home/file.txt" 161L, 9896C written
E207: Can't delete backup file

:se backup? returns nobackup. The privileges of thefile are -rwxrwxrwx

This happens in neovim NVIM v0.5.0-445-gca02db1f9. If I try it with an older nvim like NVIM v0.2.2 it writes without any error just using :w.

Edit: more settings:

backupcopy=auto
backupdir=.,~/.local/share/nvim/backup

set writebackup? seems empty


Get this bounty!!!

#StackBounty: #backup Error when w!riting a file "Can't delete backup file"

Bounty: 50

I’m having a problem when writing to a file created by another user. When I try to do :w I get the error message E506: Can't write to backup file (add ! to override) and when I do :w! the file get’s written but I still see this:

/share/home/file.txt" 161L, 9896C written
E207: Can't delete backup file

:se backup? returns nobackup. The privileges of thefile are -rwxrwxrwx

This happens in neovim NVIM v0.5.0-445-gca02db1f9. If I try it with an older nvim like NVIM v0.2.2 it writes without any error just using :w.

Edit: more settings:

backupcopy=auto
backupdir=.,~/.local/share/nvim/backup

set writebackup? seems empty


Get this bounty!!!

#StackBounty: #backup Error when w!riting a file "Can't delete backup file"

Bounty: 50

I’m having a problem when writing to a file created by another user. When I try to do :w I get the error message E506: Can't write to backup file (add ! to override) and when I do :w! the file get’s written but I still see this:

/share/home/file.txt" 161L, 9896C written
E207: Can't delete backup file

:se backup? returns nobackup. The privileges of thefile are -rwxrwxrwx

This happens in neovim NVIM v0.5.0-445-gca02db1f9. If I try it with an older nvim like NVIM v0.2.2 it writes without any error just using :w.

Edit: more settings:

backupcopy=auto
backupdir=.,~/.local/share/nvim/backup

set writebackup? seems empty


Get this bounty!!!

#StackBounty: #backup Error when w!riting a file "Can't delete backup file"

Bounty: 50

I’m having a problem when writing to a file created by another user. When I try to do :w I get the error message E506: Can't write to backup file (add ! to override) and when I do :w! the file get’s written but I still see this:

/share/home/file.txt" 161L, 9896C written
E207: Can't delete backup file

:se backup? returns nobackup. The privileges of thefile are -rwxrwxrwx

This happens in neovim NVIM v0.5.0-445-gca02db1f9. If I try it with an older nvim like NVIM v0.2.2 it writes without any error just using :w.

Edit: more settings:

backupcopy=auto
backupdir=.,~/.local/share/nvim/backup

set writebackup? seems empty


Get this bounty!!!

#StackBounty: #backup Error when w!riting a file "Can't delete backup file"

Bounty: 50

I’m having a problem when writing to a file created by another user. When I try to do :w I get the error message E506: Can't write to backup file (add ! to override) and when I do :w! the file get’s written but I still see this:

/share/home/file.txt" 161L, 9896C written
E207: Can't delete backup file

:se backup? returns nobackup. The privileges of thefile are -rwxrwxrwx

This happens in neovim NVIM v0.5.0-445-gca02db1f9. If I try it with an older nvim like NVIM v0.2.2 it writes without any error just using :w.

Edit: more settings:

backupcopy=auto
backupdir=.,~/.local/share/nvim/backup

set writebackup? seems empty


Get this bounty!!!

#StackBounty: #backup Error when w!riting a file "Can't delete backup file"

Bounty: 50

I’m having a problem when writing to a file created by another user. When I try to do :w I get the error message E506: Can't write to backup file (add ! to override) and when I do :w! the file get’s written but I still see this:

/share/home/file.txt" 161L, 9896C written
E207: Can't delete backup file

:se backup? returns nobackup. The privileges of thefile are -rwxrwxrwx

This happens in neovim NVIM v0.5.0-445-gca02db1f9. If I try it with an older nvim like NVIM v0.2.2 it writes without any error just using :w.

Edit: more settings:

backupcopy=auto
backupdir=.,~/.local/share/nvim/backup

set writebackup? seems empty


Get this bounty!!!

#StackBounty: #backup Error when w!riting a file "Can't delete backup file"

Bounty: 50

I’m having a problem when writing to a file created by another user. When I try to do :w I get the error message E506: Can't write to backup file (add ! to override) and when I do :w! the file get’s written but I still see this:

/share/home/file.txt" 161L, 9896C written
E207: Can't delete backup file

:se backup? returns nobackup. The privileges of thefile are -rwxrwxrwx

This happens in neovim NVIM v0.5.0-445-gca02db1f9. If I try it with an older nvim like NVIM v0.2.2 it writes without any error just using :w.

Edit: more settings:

backupcopy=auto
backupdir=.,~/.local/share/nvim/backup

set writebackup? seems empty


Get this bounty!!!