FAQ Database Discussion Community


Backup VM instances using Azure Backup Services

azure,backup,azure-virtual-machine
Can I backup VM instances using Azure Backup Services, with Site Recovery Vault?

keep n retention and delete old one

python,json,backup
I have the code below which looks for 2 keys and deletes the old one. That means I only have one data-retention def delete_old_snap(self, volumeid): list_snap = self.snapshots() def doubles(l): keys = [i["volume_id"] for i in l if i["volume_id"] == volumeid] keys = {k for k in keys if keys.count(k)...

Backing up folder using Powershell Copy-Item cmdlet

file,powershell,backup,copy-item
I want to backup all files on a volume that have changed in the past 24 hours. I want the backup folder to keep the folder structure of the original. I find that when I test my current script, the folders are all placed in root. $today = Get-Date -UFormat...

monitoring the backup

backup,monitoring,nagios,health-monitoring
Does anyone know any related work about: 1- Monitoring the backup done by HP Data Protector using Nagios or Icinga 2- Monitoring the backup done by HP Data Protector by any other monitoring tool 3- Monitoring the backup in general

Backing up my wordpress sites

wordpress,backup,database-backups
Hi I have a lot of wordpress sites (more than 30) and I'm currently using MainWP plugin, but it is taking too much resources and sometimes it takes my server down. Does anyone knows if there is a plugin that backups several sites in one wp admin console like mainWP?,...

Backing up a single file in Azure website

azure,backup,azure-web-sites
I have a website in Azure which uses a SQL CE 4.0 database. For security reasons, I want to have a backup of the database created daily and stored for two weeks. The database is fairly small (under 10 MB), but the website itself contains a huge folder with images,...

Export paperclip images in a clean hierarchy

ruby-on-rails,ruby,ruby-on-rails-3,paperclip,backup
I'm working on a rails 3.2.8 app that will be soon shut down. This app has a post model that has_many assets. The asset model is paperclip managed. class Asset < ActiveRecord::Base attr_accessible :post_id, :photo belongs_to :post has_attached_file :photo, :styles => { :thumb => '260x260#', :normal => { :geometry =>...

Backup files from a server to another

backup,server,provider
is it possible to create backup saving some files (copy and replace) from a server to another, not necessary the same provider ? Thanks !

How can I copy variable file from bash script

bash,shell,scripting,backup
I run the following script: #!/bin/bash { date=$( date '+%Y-%m-%d_%H-%M-%S' ) file="mysql_dump_$date" echo '###Start DB Backup '$date'###' mysqldump -h localhost -u 'USERNAME' -pPASSWD 'DBNAME' > /backup/$file echo '###DB Backuo Finished '$date'###' } >> /backup/backup.log As you can see in the mysqldump line, $file will be named mysql_dump_date I would like...

iOS Group Containers backed up?

ios,file,backup
so i know that some, or let's say nearly all, files are backed up on iOS. I know how to prevent them from being backed up. To maybe save unnecessary work i wanted to know if the content of containerURLForSecurityApplicationGroupIdentifier: is being backed up too? I couldn't find anything...

Bash output limited to echo only

linux,bash,shell,backup,echo
I am writing a bash script to handle by backups. I have created a message function controller that uses functions to handle email, log and output. So the structure is as: message_call(i, "This is the output") Message Function -> Pass to email function --> Build email file -> Pass to...

how to make a tar file backup of a directory in python

python,recursion,backup
What I'm trying to do: I'm trying to make a recursive .tar file backup of the directory this python script is run in. What I currently have: import os import zipfile import datetime import tarfile datetime = str( datetime.datetime.now() ) def zipdir(path, zip): for root, dirs, files in os.walk(path): for...

How do I back up my Linux system

linux,backup
I am using Yocto distribution of Linux. And currently, I am looking to back-up my system following the guide: http://ubuntuforums.org/showthread.php?t=35087 The part I am having trouble with is that and go to the root of your filesystem (we use this in our example, but you can go anywhere you want...

Can I restore data from copied backup set in Oracle?

oracle11g,backup
I have copy of backup set (level 0 and level 1 incremental backups) from Oracle 11g running on Linux. Can I restore data from this set on other machine which running Windows without connection to source database?...

How to protect Duplicity backups

backup,duplicity
I use Duplicity for backing up my hosting account to remote server using WebDav. Schedule is daily incremental, monthly full. I want to also protect backups against hosting hack, so I have to be sure that server (where is Duplicity) can not destrol backups on remote server. Is there recommended...

Keep x versions of a file in Folder - delete rest

powershell,backup
I have backup process that makes a copy of files and appending system time at the end. Date stamp indicates when the file was received via FTP (ddMMYYYYhhmmss). fileName1.ZIP02062015090653 fileName1.ZIP01062015090653 fileName1.ZIP31052015090653 fileName1.ZIP29052015090653 fileName1.ZIP28052015090653 fileName1.ZIP21052015090653 fileName2.ZIP02062015090653 fileName3.ZIP02062015090653 reportName1.PDF02062015090653 reportNameX.TXT02062015090653 etc.. I need the script to keep the 5 most recent versions...

Batch file to delete all folders in a directory except the newest folder

batch-file,backup,folders
I am trying to delete old backups in a specific folder after a new backup has been done. As i do not really have experience with DOS commands i mashed a couple of scripts i found on the internet into one: ::(C)2008 "BuckFix" www.winsupportforum.de @echo off setlocal set workdir="M:\BACKUPS\CACHE_SSD\" set...

Application for backup a MYSQL

mysql,windows,backup
I'm trying to backup MYSQL automatically on specified time every day, i searched for a free tool but i didn't find any thing ! Is there any free tool or application for backup a MYSQL database from my domain?

How to use a volume label in a Windows path?

windows,batch-file,backup,volumes
I want to copy files off a removable drive using a batch file, regardless of the drive letter it gets. So far, no go. There don't seem to be any readily available commands or 3rd-party command-line tools that would handle paths based on volume labels. I tried FreeFileSync, but it...

How to Copy (and increment) Multiple Instances of a File Using Batch File

batch-file,copy,backup,windows-ce,increment
I need to create a batch file that copies a file and increments it upon placing it at the destination. Example. copy C:\TEMP\MyDoc.txt E:\MyData\ Essentially, I need this copy command to copy every time I start it (which it does now just fine). I would like it to increment the...

opscenter backup fails while trying to snapshot and non-existing SStable

backup,datastax-enterprise,opscenter
I'm running a DSE cluster in AWS: m2.4xlarge instances running Datastax Enterprise 4.6.1, with Cassandra 2.0.12.200 and Opscenter 5.1.0. When we try to do a backup of a keyspace, we get this: Snapshot of keyspaces [XXXXXXX] on node XXX.XXX.XXX.XXX failed: javax.management.RuntimeMBeanException: java.lang.RuntimeException: Tried to hard link to file that does...

Revert backup table data to original table SQL

sql,database,oracle,plsql,backup
I have created a backup for my country table. create table country_bkp as select * from country; What SQL should I use to restore the country table to it's original state? I can do insert into country select * from country_bkp; but it will just have duplicate entries and probably...

Elasticsearch: Restore snapshot with different shards number

elasticsearch,backup,sharding,snapshot
I have created an Elasticsearch snapshot and want to restore it with a different number of shards: My old cluster uses 5 shards for every index, I want to reduce it to 2 shards. Is this somehow possible to do this with the Elasticsearch snapshot API?...

Find & delete folder (ubuntu server)

bash,ubuntu,find,backup
I have a backup system in my ubuntu server that every day makes a database backup and save it in a folder named like the day: $(date +%d%m%y) But on the script, when I try to find and delete the folders from the last week, the command don't find any...

Tar and save results directly to an SSH directory

linux,ssh,backup,tar
I have a server that I would like to make a tar backup of, but the server itself doesn't have enough disk space that is equal to the data it contains. Therefore, I would like to tar it directly to an ssh directory, such that it would dump the tar...

How can I restore forum posts from a Moodle backup into another server installed from scratch?

backup,moodle,forums
Last year I taught an online course in my university Moodle website (back then, running Moodle 1.9) . There were a lot of forum posts in that course that I wanted to save for further analysis so I asked my university's technical staff a backup (.zip) of that course. So...

SVN revision corrupted

apache,svn,backup
My SVN revision 22026 is corrupted. I have verified by using svnadmin verify command. I manually verified the 22026 file in db\revprops and in \db\revs folder. 22026 file is empty in revprops folder but content is available in revs folder. It looks like revision 22026 property file is corrupted or...

backup mysql with emc networker

mysql,backup,emc
On a CentOS machine we have mediaWiki + bugZilla installed for internal uses. I'd like to use the EMC Networker that there is in our network to backup the databases. Is it enough to backup the /var/lib/mysql/ directory ? And if yes, do i need to backup the whole directory...

Windows batch script to copy newest files with partial names

batch-file,backup,batch-rename
I have a backup program that saves .bak files into a folder which it rotates on a weekly basis automatically. The files are given given names like this: DB_Live_19052015.bak DB_Test_19052015.bak DB_Live_18052015.bak DB_Test_18052015.bak The backup program doesn't allow me to edit these names and I actually don't want it to. What...

How to run remote shell command using python script

python,shell,command,backup
I tried to run remote command to back up my server db, after dumbing it I can't figure out how to remotely get the datas. https://docs.python.org/2/library/subprocess.html Found some documentation, but that didn't really helped me....

Capture Output of dscl Command for Backup Script

osx,bash,shell,scripting,backup
I am currently managing a fleet of Macs that are being recycled so we need to figure out a way to automate a onetime backup of a user's folder (excluding any superfluous accounts like Shared or root) on the system to a network share using rsync. I would like to...

Linux backup script “file changed as we read it”

linux,bash,backup
I have been having a fiddle with a backup script posted on Github The script uses tar. The files I wish to be backed up include folders/files that are being written/read continously. I wish for the script to take a backup anyway of the "image" of the file at the...

Python: unpack android backup?

android,python,backup,tar,zlib
I'd like to unpack an Android backup file using python. According to http://nelenkov.blogspot.com/2012/06/unpacking-android-backups.html an unencryted adb file can be decompressed using dd if=mybackup.ab bs=24 skip=1|openssl zlib -d > mybackup.tar and tar xvf mybackup.tar Can these can be done in python? Python has zlib, gzip and tarfile, which seem as if...

Backup MySQL DB along with CarrierWave uploads stored in S3

mysql,ruby-on-rails,amazon-s3,backup,carrierwave
In Rails app I would like to take backups of MySQL database along with CarrierWave uploads stored in Amazon S3. I have looked into S3 object versioning but couldn't find any support in CarrierWave for it. Has anyone done this before? Or any ideas?...

Powershell SMO objects

database,windows,sql-server-2008,powershell,backup
I am trying to learn powershell, recently i was struck in the query that how can find out the objects in the assembly's example: I have loaded the Powershell sql assembly [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.sqlserver.smo") | Out-Null [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.sqlserver.smoextended") | Out-Null For denoting the server, I need to add New-Object ("Microsoft.sqlserver.Management.SMO.Server") For backup database...

FTP backup script with hard links using

bash,ftp,backup
Usually I use rsync based backup. But now I have to make backup script from Windows server to linux. So, there is no rsync - only FTP. I like ideas of hard links using to save disk space and incremental backup to minimize traffic. Is there any similar backup script...

Running rsync as root: Operations Not Permitted

osx,bash,scripting,permissions,backup
World! I have a backup script that would run rsync for every user and will archive their /User/user folder onto our shared drive. Running into an interesting problem with rsync: when executing the script as "sudo" from the shell as the current user I'm unable to preserve the permissions of...

MySQLdump is executing, but not actually working

mysql,database,backup,mysql-backup
I'm trying to back up and restore a MySQL database using mysqldump. With my commands I am making a back up file and then restoring that file, but where I'm restoring the database shows no change. This creates the backup folder in the same directory as the mysqldump.exe file: In...

Restoring Django dump

django,backup
I've been running a daily dump of a production Django application as follows: ./manage.py dumpdata --exclude=contenttypes --exclude=auth.Permission -e sessions -e admin --all > data.json Normally, restoring this to another installation for development hasn't caused a problem, but recently attempts to restore the data have caused this: ./manage.py loaddata -i data.json...

How can I make a script to recover my Grooveshark playlists now that the service has been shut down?

bash,backup,playlist,recovery,grooveshark
The Grooveshark music streaming service has been shut down without previous notification. I had many playlists that I would like to recover (playlists I made over several years), but the website is now only showing this image: Is there any way I could bypass that redirection to recover my playlists...

Backup github repository, branches and commits?

github,repository,backup
I want to backup everything including master & other branches & commits on my local & create new repository using different account. Which steps should i follow ? (bundle, mirror or clone)...

BackupWrite: access denied on reparse points

backup,reparsepoint
I am using BackupRead and BackupWrite to implement a file synchronization between 2 folders. I can use them on files and folders without any issue. But when I want to use them on a reparse point, BackupWrite fails with an access denied error. The original reparse point is retrieved without...

What happens when a transaction is being carried out during backing up of LDF files?

sql,sql-server,sql-server-2008,backup
My DB Admin advised that I should regularly take backup of .ldf files. Fine, this SQL post here explains this beautifully. Consider that a transaction is being done in SQL Server. And at the same time, a scheduled process tries to access the .ldf file for backing it up. What...

What's the right way to restore using SQL Azure point in time restore?

sql-server,azure,backup
This afternoon a Sitefinity application broke. Our client had been madly updating content in preparation for imminent go live. We quickly decided that restoring the SQL Azure database would be the fastest way to fix things. Something I had done in the last 10-20 minutes broke the application. The client...

How to remove the temporary files starting and ending with '#' created by Emacs when it closes?

emacs,backup,kill-process
When Emacs is closed with modified buffers present, it creates a file with the format '#file_name#' for recovery purpose in its parent directory for each modified buffer (except for scratch). When recover-file command is used when Emacs opens the next time, the previously modified buffer of the file is recovered....

Syncing Vagrant VMs across different physical servers

linux,vagrant,backup,virtual-machine,sync
I'm using Vagrant to deploy my VMs and my current setup looks like this: server1 = VM1, VM2, VM3 ( main production server ) server2 = VM1, VM2, VM3 ( backup server ) My questions is, can I somehow sync the VMs across the different physical servers in case one...

Can I have multiple image backup?

windows,backup
I am using the image backup feature in windows 8.1 to create a backup of my system. However. If I try to create a new one, the first one is overwritten. So i create a new one, rename it and create a second one. However, when I want to restore...

Can't import to heroku postgres database from dump

postgresql,heroku,backup,database-backups
Sorry if it is a duplicate, but I tried to find an answer here, and nothing helped. So I've read heroku articles like this and this. I was able to save a dump file, which I've created with pg:backups capture command. Uploaded it to s3 and tried to restore it...

How to backup and restore Virtual machine OS?

backup,virtual-machine
In VM ware Virtual machine i have installed the Centos in Window 7.Now i want to re install my Window 7 but i do not want to loose my virtual machine Centos. I Google many time for this topic but did not find any helpful information. Any help? Thanks...