Hot answers tagged

12

You start at the beginning, square one. I'm sorry but you wiped everything, that's a brutal command. Not only did you wipe out the linux install, but you took the windows data with it. What you did didn't just wipe stuff in the partitions (/dev/sda1, 2, etc.), it wiped the partition table too because it matched /dev/sda which is the drive device itself. ...


11

I think you are looking for lvconvert --merge. From the man page: --merge Merges a snapshot into its origin volume. To check if your kernel supports this feature, look for snapshot-merge in the output of dmsetup targets. If both the origin and snapshot volume are not open the merge will start immediately. Otherwise, the merge ...


9

Assume that you have # at beginning of comment lines, so you can do: yum -y install $(awk '!/^#/' list) !/^#/ cause awk to ignore any lines that start with #, print the rest.


8

Arch isn't designed to work like that: it is a rolling release, so you are always going to have to continue to upgrade packages as they are pushed to your repo: the only alternative is to freeze everything. Having said that, what you are asking can best be managed, within the Arch framework by doing two things: updating regularly (so that you are only ...


8

Restore You can restore the image back to your replacement HDD with something along the lines of: # dd if=backup.img of=/dev/sd? You will end up with a clone of your original disk including all partitions and data. The downside to this is that the partitions won't be resized by dd so your replacement disk must be identical to or larger in capacity than ...


7

# take a read-only snapshot: btrfs sub snap -r fs snapshot ... do things on fs # rolling back: btrfs sub del fs # at which point you'll lose those things you've done # if you want to preserve them, just rename fs instead btrfs sub snap snapshot fs # reinstate snapshot as a read+write fs btrfs sub del snapshot # delete the non-longer ...


7

LVM does support read-write snapshots in fact that's the default. Merging a modified snapshot will delete the data on the snapshot origin volume the same way merging an unmodified snapshot would. If you expect to discard modifications then I recommend RW snapshots and merge if you want to keep them. If you expect to keep the modifications then you should ...


6

/var/cache is not a free-for-all like /var/tmp. Each service that requires it has a subdirectory in /var/cache with appropriate permissions for it to store files. On Debian and derived distributions, you can run dpkg -S /var/cache to find what packages have set up directories under /var/cache, and apt-get --reinstall install PACKAGE_NAME … to reinstall ...


5

(If you have three questions, it's better to ask three separate questions. But since the answers are short I'll answer them all.) Both rsync and rdiff-backup have fairly powerful file selection mechanisms, based on inclusion and exclusion rules. I wrote an rsync filter tutorial. Rdiff-backup's filters are based on the same principles but the details are ...


5

I know this is an old question, but I recently had the same problem, so I'll provide a solution hoping it'll help someone out there. It's really easy - use the --force flag. duplicity --force file:///home/user/Backup / This will probably not only restore missing files to the directories you've backed up, but also replace newer versions of backed up files ...


4

Linux distros in general are not set up with anything like a restore system. There are small exceptions. The RPM based distro I use keeps an archive of all previous versions of packages when they are upgraded. It's possible to install those packages and roll the software back to what it was before an upgrade, but this creates dependency chaos and is less ...


4

First of all you should be aware of slapcat's limitations: For some backend types, your slapd(8) should not be running (at least, not in read-write mode) when you do this to ensure consistency of the database. It is always safe to run slapcat with the slapd-bdb(5), slapd-hdb(5), and slapd-null(5) backends. So you better pack that backup in /etc/init.d/...


4

To get true atomicity, you would need to use filesystem-level features like btrfs snapshots.


4

Package management is one of the main differentiators between distributions. Between unrelated distributions, you won't be able to do anything automatic. Different distributions break down software into different sets of packages and use different names. Between machines running the same version of the same distribution, you can achieve a similar ...


3

I suggest you to use rsync instead of backuping your files manually. With this tool, you can do exactly what you're doing with some extra features. For example, you can pass the --progress argument to know the last file copied. Another feature is that you can copy only the new files or the modified ones, which will reduce the amount of data transmitted ...


3

You can use some marker file, when the restore is complete. When the restore is incomplete and the marker file is missing, you know you must remove the incomplete restore.


3

Well, given that FreeBSD is opensource, you could simply port FreeBSD's restore to your operating system. Cygwin might help you there as it emulates some of the Unix API so there would be fewer things you need to adapt to make it work.


3

Adding to Orion's answer, I would also throw Clonezilla in to the mix. A FOSS alternative to Ghost and Acronis.


3

The two things I do in Arch is READ BEFORE UPGRADING and Downgrading Packages. I don't know of any restore point :).


3

You should be able to tar up everything and extract it to the new drive. First plug in the second drive, then boot into something that doesn't use the source drive, such as a live CD. After that just copy everything over. For example: # Mount the source drive mkdir /mnt/source mount /dev/sda1 /mnt/source # Mount the destination drive mkdir /mnt/destination ...


3

You colud use Clonezilla. It is Linux LiveCD distribution created to make backup copies of full disks or partitions. Download it, burn on CD and boot computer. After that you need to choose source and destination - when you want to back up whole drive you need another drive to write backup on it. When you choose to back up only one partition your backup can ...


3

You can restore your home directory, or all home directories (i.e. all of /home), /usr/local, and /root wholesale and indiscriminately. For the rest: /usr: don't restore this at all (except for /usr/local). The contents are all managed by the Debian package manager. Just get the files back by reinstalling the same packages you had before. In fact, unless ...


3

Solved it with help of the accepted answer here: Can overwritten files be recovered? For larger files that may be in multiple non-contiguous blocks, I do this: grep -a -b "text in the deleted file" /dev/sda1 13813610612:this is some text in the deleted file which will give you the offset in bytes of the matching line. Follow this with a series ...


2

It's going to depend on the filesystem you're using, not just the OS or package manager. If you run / on btrfs, you could leverage its snapshot ability to do this. I've only just started in with Arch, but as an example of what could be done: Ubuntu has apt-btrfs-snapshot. It's a relatively simple script that hooks into apt to create a btrfs snapshot right ...


2

Try from the other side: create R/W snapshot, use it as new main one, do "some experiments" on old one, then just drop contents of old. Article "BTRFS Fun" can be helpful.


2

The CVSWeb got it covered, but ident /etc/rc.d/rtadvd on my 8.2-RELEASE-p3 system yields $FreeBSD: src/etc/rc.d/rtadvd,v 1.12.2.1.6.1 2010/12/21 17:09:25 kensmith Exp $ which I can't find there... hope this still helps, rev 1.12 is tagged RELENG_8.


2

I think what you're looking for is 3rd party image backup and restoration software, like Acronis TrueImage or Norton Ghost. Both can take both partition and whole image backups, which I think is what you're looking for.


2

Right off the bat make a dd disk image of the drive, and work with that instead of the drive itself. That lets you experiment. dd if=/dev/sda3 bs=1M > sda3.img Beyond that I'm not sure. I'd hit google. Might look at it later. edit; http://www.cgsecurity.org/wiki/TestDisk looks promising.


2

You can use chmod to first copy permissions to the backup. chmod --reference <reference> <target> Copy backup file to linux system using a different name like file.bak cp /mnt/windows/FILE /etc/directory/FILE.bak apply the permissions from the original file chmod --reference /etc/directory/FILE /etc/directory/FILE.bak mv backup to target ...


2

There are very few files that absolutely must be different between two machines, and need to be regenerated when cloning: The host name /etc/hostname. The SSH host keys: /etc/ssh_host_*_key* or /etc/ssh/ssh_host_*_key* or similar location. The random seed: /var/lib/urandom/random-seed or /var/lib/random-seed or similar location. Anything else could be ...



Only top voted, non community-wiki answers of a minimum length are eligible