14
votes
Accepted
Restore ZFS Pool and storage data after a system re-install
If the disks are recognized from your OS the command:
zpool import
should be enough to get the pool imported and visible in your current OS. You can check the status with command
zpool status
You ...
13
votes
Accepted
Backup my EFI boot entry for easy restore
It's easy enough to recreate a boot entry from scratch once you know how... and have the efibootmgr tool at hand, of course.
Boot0000* debian HD(13,GPT,007a058a-8e5e-45df-8d97-6575b66b5355,...
12
votes
Accepted
Backup and restore IMAP mail account with (open source) Linux tools
Updated Oct 2024.
Originally posted the answer when the question was 'just' 7 years old, it is now ~10 years old. At the time I was looking for a solution to migrate off of Google Workspaces as they ...
7
votes
Backup and restore IMAP mail account with (open source) Linux tools
Try to use open source project imap-backup: https://github.com/joeyates/imap-backup
$ imap-backup setup
The setup system is a menu-driven command line application.
It creates ~/.imap-backup ...
7
votes
How can I create an image of a partition (ext4) and later mount it to browse/restore files?
e2image can be used to create an image of an ext4 file system, while only copying sectors which are in use:
e2image -ra /dev/sda1 /path/to/file.img
file.img will be created as a sparse file, so it ...
7
votes
Accepted
Copying or restoring crtime for files/directories on ext4fs filesystem
I've actually solved it on my own. You never know what you can do till you try :-)
It must be safe to run even when all the filesystems are mounted read-write.
#! /bin/bash
dsk_src=/dev/sdc4 # ...
7
votes
Accepted
Rollback root snapshot in BTRFS
What you have is a BTRFS filesystem with two subvolumes:
fedora - This is set as your default subvolume, and is what you see when you mount the filesystem without specifying specifying a subvolume. ...
6
votes
How to restore permissions with BackInTime/rsync?
GNU chmod can take a reference file:
--reference=RFILE
use RFILE's mode instead of MODE values
If the folder structure of your back remains the same, you could do something like:
cd /path/to/backup
...
5
votes
Accepted
Restore a removed file when still in use
On Linux at least, you can access all files which a process still has open, in /proc/${pid}/fd:
$ echo Test > removeme
$ sleep 1200 < removeme &
[1] 21954
$ rm removeme
$ ls -l /proc/21954/...
5
votes
Accepted
How can I create an image of a partition (ext4) and later mount it to browse/restore files?
As root, just cat the partition to another partition: cat /dev/sdXn > /dev/sdYi
or to a file: cat /dev/sdXn > backup.img
Or to a file or partition on another machine: cat /dev/sdXn | ssh user@...
5
votes
Accepted
dd: "No space left" when restoring backup to exact same disk
It's possible for dd conv=sync,noerror (or dd conv=noerror,sync) to corrupt data in some cases.
However in your case it's probably simply surplus zeroes at the end of file. If your device is not ...
5
votes
Backup my EFI boot entry for easy restore
Rather than back up your firmware efi boot entry, just have the tools on hand to easily recover it.
Usually windows doesn't delete your linux entry, but it may prioritize itself first. Modern ...
4
votes
Backup and restore IMAP mail account with (open source) Linux tools
OfflineIMAP is a GPLv2 software to dispose your mailbox(es) as a local Maildir(s).
For example, this allows reading the mails while offline without the need for your mail reader (MUA) to support ...
4
votes
Accepted
Backup and Restore a Debian system
This will work, in that you will be backing up all of your data - and I recommend it to back up your data. I personally use this method to back up several full systems in small environments (as well ...
4
votes
Accepted
Tar incremental backup restore with one command
cat archive.*tar |tar xvf - -g /dev/null --ignore-zeros -C destination
At the end of tar files, is the 'end-of-archive' marker (2x 512 blocks of zero bytes. Tar will continue to read past the marker ...
4
votes
Accepted
Debian - Restore a Timezone File
The command you need is:
apt-get install --reinstall tzdata
Background
To know which package contains the file you damaged, you could do a
dlocate -S /usr/share/zoneinfo/America/Puerto_Rico
or
...
3
votes
How to restore permissions with BackInTime/rsync?
We can get the list of files with the changed permissions by rsync -ani
rsync -ani newFile new/ | awk {'print $2'}
then we can pass the output to chmod and use the output for reference file from ...
3
votes
Accepted
Can I restore a Macintosh disk image using dd?
Short answer: yes this works fine.
Longer answer: I used dd to restore the data as above, and it was successful. However, the Mac wouldn't load the OS upon power-on. Picking the HDD from the startup ...
3
votes
Accepted
How can I keep permissions on original files when restoring backups with Duplicity?
Duplicity can and does restore permissions and owner of your files/folders as they were before the backup. To restore the owner two prerequisites have to be met:
The restore command has to be run as ...
3
votes
Can I restore a single partition from a Clonezilla disk image?
I just had to restore a partition from one of my image backups.
Steps:
As my backup was to an external nfs drive, I booted of the clonezilla cd,
start clonezilla
select device image
select ...
3
votes
Using rsync to create a complete OS backup/clone sufficient?
No, it won't work at all.
You should send it to a mounted filesystem, so not /dev/[backup disk] but something like /mnt/[backup disk]/ after doing mount /dev/[backup disk] /mnt/[backup disk]
...
3
votes
Arch linux: restore session with running programs after running out of battery
First setup hibernation on arch,
https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Hibernation
Then create a udev rule to hibernate on low battery percentage,
https://wiki....
3
votes
Accepted
Backup and restore timestamps of files/directories?
If you have GNU find and Perl available, you could rig something up with them. The -printf action to find can print the timestamps, and Perl has the utime function to modify them. Or two, the builtin ...
2
votes
How to restore a DD image file in my primary disk on new debian server
You can SSH to your server, CAT your file into a pipe to GUNZIP after what you can pipe the uncompressed output to DD, which will then write the file to the disk of your choice.
ssh user@host cat /...
2
votes
Accepted
dd image too large to recover
Your image file is 40KB larger than the disk (976773248 - 976773168 sectors). It can't work to dd the whole image to the disk. I guess your dd command was showing some warnings like "no space left" or ...
2
votes
restore after "git rm"
Since none of the files had been committed, they are now lost.
Had they been committed, you would have recovered by issuing
git reset --hard
That would have restored the files removed (and reverted ...
2
votes
How could you possibly preserve file ownership in a backup (/etc)?
The way I do it is to install etckeeper. It is well integrated in Debian and derivatives. Etckeeper takes care of remembering permissions (but not SELinux labels). Backing up /etc is then reduced to ...
2
votes
Accepted
Debian: I'm unable to log in + can't boot properly after system backup and restore
You've failed to restore the file ownerships and permissions for the OS files. I'm quite impressed the system boots and allows root to log in.
If you took good backups you should be able to wipe and ...
2
votes
Accepted
How to restore GRUB after restoring Debian from backup?
You also need to mount /sys on to /mnt.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
restore × 170backup × 80
linux × 24
debian × 14
ubuntu × 13
dd × 12
rsync × 11
partition × 10
filesystems × 8
lvm × 7
tar × 7
data-recovery × 7
snapshot × 7
dump × 7
duplicity × 6
windows × 5
freebsd × 5
btrfs × 5
centos × 4
files × 4
arch-linux × 4
permissions × 4
ext4 × 4
mv × 4
session × 4