Tag Info

Hot answers tagged

12

cp with the --force and --verbose options (-f and -v in your command line) outputs the "removed" message whenever it removes a destination file before copying it. (--force tells cp to remove a destination file if it can't be opened, before trying the copy again.) In your example, it means that ./rena/dev/lua/conkybitcoin/conkybitcoin.lua couldn't be opened ...


2

This is how I would do this: find /var/backup/ -type f -maxdetph 1 $(printf "! -name %s " ${keep[*]}) \ -exec rm {} \; Note that this will not work if your file names have spaces in them.


1

How about using grep -vE with the following expression: $ echo "$(IFS=\| && echo "${keep[*]}")" ...


1

This should work, with some caveats. For one thing, beware of differing FS UUIDs; modern distros often list mounts in /etc/fstab via UUID, which won't survive making new FS and untarring (though it might survive a dd straight from one block device to the other). For another, you'll need to re-tweak GRUB to make it boot, making sure to give the proper set ...


1

rsync -avz /dev/sda1 user@ip:/backup/ would attempt to copy the device node, not the disk content. You can make an image of the partition as a remote file: ssh -C user@ip:/backup/sda1.img </dev/sda1 This makes an image of the partition. It won't give you access to your files. In order to access your files, you need to mount the partition or the image: ...


1

You can do dd if=/dev/sda of=back.sda bs=10M You can increase or reduce the bs(block size) based on your i/o capacity(fast increase,slow decrease),then copy the back.sda with scp or rsync on backup. Later you can mount the image and recovery the files,this will work if sda is not broken disk,if is corrupted you can try a fsck. Rsync works for files,i ...


1

Compressibility of a disk image depends a lot on what kind of data is stored in there, how much of it is used or has ever been used (without being explicitely erased during the whole life of that drive). In short, it's impossible to tell. 77% is completely plausible as are 0% (a disk full of videos/oggs) and 99% (an empty, recently erased with zeros disk). ...


1

Put all your hostnames in a file, each on a separate line, then ... for h in $(cat <file>); do ssh $h dpkg --get-selections >/tmp/$h.dpkg; done


1

I think you missed section '13.4.3. Do the backup'. LVM can be used to take a copy of the data at a point in time so you have a consistent** image of that data. As such, you can then use another tool (eg tar, fbackup etc) to do the actual backup. If you want to use LVM as a backup mechanism in itself, yes you do need to actually keep the LVM snapshot. ** In ...


1

Here is the timeline of events. The first backup made by rsnapshot will be hourly.0. When the second backup is made by rsnapshot, it first renames hourly.0 to hourly.1 and the proceeds to create a new hourly.0. When the third backup is made by rnapshot, it first renames hourly.1 to hourly.2, renames hourly.0 to hourly.1, and then creates hourly.0. Thus ...


1

Install docker and then install ubuntu inside it(i.e. a container with ubuntu as its base.) and then install Geonode inside it, take backup of docker images as frequently as you want using a cron job. The docker images are of minimal size and are easily portable too.


1

I have a dir in /home called backups so I am looking to omit that directory from the backup using say -x /home/backups. How would I go about implementing this? To go about implementing this you would look through the script and discover the relevant lines for making the directory backup: # Compress tables and files cd $TARGET_DIR tar -czf ...


1

I tried following @ignis's suggestion to use seeding but had problems with it; the system threw an error when trying to remove the seed device and I could not overcome this. Then I found that there is (now - btrfs-progs v3.19-64-g19a806f, maybe not earlier) the command: btrfs replace start [-Bfr] <srcdev>|<devid> <targetdev> <path> ...



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