Tag Info

New answers tagged

0

Yes; that is exactly how you backup and restore a system.


11

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 ...


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

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

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

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


0

To back up my pi, I remove the microSD card, and plug it into my laptop. Then run a dd to produce a file on my laptop of the entire disk, as per above: dd if=/dev/mmcblk0 of=/path/to/backup/directory/backup.img bs=1M


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 ...


0

Rsync doesn't keep any memory from one run to the next. If you move a file to a different computer, rsync doesn't care. If you interrupt rsync in the middle of transferring a large file (it isn't clear from your question whether you intended to do that), that file is lost. To keep partial transfers, pass the --partial option.


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.


0

To achieve this task I used a shell script and a procmailrc file. The core of the shell script is just a way to split a huge mailbox and feed it to procmail with a tuned procmailrc file: $ cat <<eof >splitter.sh #!/bin/sh orig_mailbox=$1 formail -s <${orig_mailbox} procmail ${HOME}/src/splitter_procmailrc eof And the procmailrc file is ...


0

Look at rsnapshot. I'm pretty sure it will do everything you want, and as a bonus can be expanded to keep files for longer than two months when you get a bigger drive.


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> ...


0

Generally speaking, no. Databases must be backed up with purpose-built utilities in order to ensure a consistent (i.e., no half-committed transactions, etc.) backup. This is actually true of any file that's being written while you're trying to copy it—it's very hard to get a consistent backup without assistance from the program writing the data. (So, if you ...


0

You asked, whether a backup utility like rsync is suitable for copying data from a database, MySQL or not The answer here is an emphatic "No!". Unless you are prepared to switch off MySQL while you perform an rsync-based backup you will almost certainly end up with a corrupted database on your backup. (The live system would remain unaffected and ...


0

A very common and simple methods to backup a linux machine is using rsync. And to your question, yes you can backup the file system tree, but the so called pseudo-filesystems like /dev or /proc are usually excluded in the file list of such a backup. See the following command: $ rsync -aHv ...


2

If your question is actually about restoring a system after a crash, you can safely forget about tar: it has a limit to the maximum length of the paths that is hardcoded in the format specs, and it doesn't handle hardlinks. For similar reasons, you shouldn't try to do backups with cp, pax, cpio, or rsync. A reasonable solution is to use dump / restore, or, ...



Top 50 recent answers are included